このメソッドを使用して、IoT セキュリティ ソリューションの集計されたセキュリティ分析の推奨事項の一覧を取得します。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations?api-version=2019-08-01
省略可能なパラメーターを含む:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations?api-version=2019-08-01&$top={$top}
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
ユーザーのサブスクリプション内のリソース グループの名前。 名前では大文字と小文字が区別されません。
正規表現パターン: ^[-\w\._\(\)]+$
|
solutionName
|
path |
True
|
string
|
IoT セキュリティ ソリューションの名前。
|
subscriptionId
|
path |
True
|
string
|
Azure サブスクリプション ID
正規表現パターン: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$
|
api-version
|
query |
True
|
string
|
操作の API バージョン
|
$top
|
query |
|
integer
int32
|
取得する結果の数。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントを偽装する
|
例
Get the list of aggregated security analytics recommendations of yours IoT Security solution
要求のサンプル
GET https://management.azure.com/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/iotSecuritySolutions/default/analyticsModels/default/aggregatedRecommendations?api-version=2019-08-01
/**
* Samples for IotSecuritySolutionsAnalyticsRecommendation List.
*/
public final class Main {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/
* IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json
*/
/**
* Sample code: Get the list of aggregated security analytics recommendations of yours IoT Security solution.
*
* @param manager Entry point to SecurityManager.
*/
public static void getTheListOfAggregatedSecurityAnalyticsRecommendationsOfYoursIoTSecuritySolution(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.iotSecuritySolutionsAnalyticsRecommendations().list("IoTEdgeResources", "default", null,
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/GetIoTSecuritySolutionsSecurityRecommendationList.json
func ExampleIotSecuritySolutionsAnalyticsRecommendationClient_NewListPager() {
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)
}
pager := clientFactory.NewIotSecuritySolutionsAnalyticsRecommendationClient().NewListPager("IoTEdgeResources", "default", &armsecurity.IotSecuritySolutionsAnalyticsRecommendationClientListOptions{Top: 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.IoTSecurityAggregatedRecommendationList = armsecurity.IoTSecurityAggregatedRecommendationList{
// Value: []*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),
// },
// },
// {
// Name: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_InstallAgent"),
// 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/TooLargeIPRange"),
// Properties: &armsecurity.IoTSecurityAggregatedRecommendationProperties{
// Description: to.Ptr("An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors."),
// DetectedBy: to.Ptr("Microsoft"),
// HealthyDevices: to.Ptr[int64](130000),
// 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('TooLargeIPRange')"),
// RecommendationDisplayName: to.Ptr("Permissive firewall policy in one of the chains was found"),
// RecommendationName: to.Ptr("TooLargeIPRange"),
// RecommendationTypeID: to.Ptr("{20ff7fc3-e762-44dd-bd96-b71116dcdc23}"),
// RemediationSteps: to.Ptr(""),
// ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityHigh),
// UnhealthyDeviceCount: to.Ptr[int64](1),
// },
// }},
// }
}
}
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 list of aggregated security analytics recommendations of yours IoT Security solution.
*
* @summary Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json
*/
async function getTheListOfAggregatedSecurityAnalyticsRecommendationsOfYoursIoTSecuritySolution() {
const subscriptionId =
process.env["SECURITY_SUBSCRIPTION_ID"] || "075423e9-7d33-4166-8bdf-3920b04e3735";
const resourceGroupName = process.env["SECURITY_RESOURCE_GROUP"] || "IoTEdgeResources";
const solutionName = "default";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.iotSecuritySolutionsAnalyticsRecommendation.list(
resourceGroupName,
solutionName,
)) {
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.SecurityCenter;
// Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendationList.json
// this example is just showing the usage of "IotSecuritySolutionsAnalyticsRecommendation_List" 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 and iterate over the result
await foreach (IotSecurityAggregatedRecommendationResource 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
IotSecurityAggregatedRecommendationData 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
応答のサンプル
{
"value": [
{
"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')"
}
},
{
"id": "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/TooLargeIPRange",
"name": "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/IoT_InstallAgent",
"type": "Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations",
"properties": {
"recommendationName": "TooLargeIPRange",
"recommendationDisplayName": "Permissive firewall policy in one of the chains was found",
"description": "An allow IP filter rule source IP range is too large. Overly permissive rules can expose your IoT hub to malicious actors.",
"recommendationTypeId": "{20ff7fc3-e762-44dd-bd96-b71116dcdc23}",
"detectedBy": "Microsoft",
"reportedSeverity": "High",
"remediationSteps": "",
"healthyDevices": 130000,
"unhealthyDeviceCount": 1,
"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('TooLargeIPRange')"
}
}
]
}
定義
CloudError
失敗した操作のエラーの詳細を返す、すべての Azure Resource Manager API の一般的なエラー応答。 (これは、OData エラー応答形式にも従います)。
名前 |
型 |
説明 |
error.additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
error.code
|
string
|
エラー コード。
|
error.details
|
CloudErrorBody[]
|
エラーの詳細。
|
error.message
|
string
|
エラー メッセージ。
|
error.target
|
string
|
エラーターゲット。
|
CloudErrorBody
エラーの詳細。
ErrorAdditionalInfo
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
IoTSecurityAggregatedRecommendation
IoT セキュリティ ソリューションの推奨事項の情報。
名前 |
型 |
説明 |
id
|
string
|
リソース ID
|
name
|
string
|
リソース名
|
properties.description
|
string
|
疑わしい脆弱性と意味の説明。
|
properties.detectedBy
|
string
|
推奨事項を作成した組織の名前。
|
properties.healthyDevices
|
integer
|
IoT セキュリティ ソリューション内の正常なデバイスの数。
|
properties.logAnalyticsQuery
|
string
|
影響を受けるデバイス/アラートの一覧を取得するためのログ分析クエリ。
|
properties.recommendationDisplayName
|
string
|
推奨事項の種類の表示名。
|
properties.recommendationName
|
string
|
推奨事項の名前。
|
properties.recommendationTypeId
|
string
|
推奨事項の種類の GUID。
|
properties.remediationSteps
|
string
|
修復に推奨される手順
|
properties.reportedSeverity
|
reportedSeverity
|
評価された推奨事項の重大度。
|
properties.unhealthyDeviceCount
|
integer
|
IoT セキュリティ ソリューション内の異常なデバイスの数。
|
tags
|
object
|
リソース タグ
|
type
|
string
|
リソースの種類
|
IoTSecurityAggregatedRecommendationList
IoT セキュリティ ソリューションの集約された推奨事項の一覧。
reportedSeverity
評価されたアラートの重大度。
名前 |
型 |
説明 |
High
|
string
|
|
Informational
|
string
|
|
Low
|
string
|
|
Medium
|
string
|
|