サブスクリプション レベルのスコープに対するすべてのサーバー脆弱性評価設定の一覧を取得する
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings?api-version=2023-05-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
subscriptionId
|
path |
True
|
string
uuid
|
ターゲット サブスクリプションの ID。 値は UUID である必要があります。
|
api-version
|
query |
True
|
string
|
この操作に使用する API バージョン。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントを偽装する
|
例
List the server vulnerability assessments settings set on the subscription
要求のサンプル
GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings?api-version=2023-05-01
/**
* Samples for ServerVulnerabilityAssessmentsSettings List.
*/
public final class Main {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/
* ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_example.json
*/
/**
* Sample code: List the server vulnerability assessments settings set on the subscription.
*
* @param manager Entry point to SecurityManager.
*/
public static void listTheServerVulnerabilityAssessmentsSettingsSetOnTheSubscription(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.serverVulnerabilityAssessmentsSettings().list(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/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_example.json
func ExampleServerVulnerabilityAssessmentsSettingsClient_NewListBySubscriptionPager() {
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.NewServerVulnerabilityAssessmentsSettingsClient().NewListBySubscriptionPager(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.ServerVulnerabilityAssessmentsSettingsList = armsecurity.ServerVulnerabilityAssessmentsSettingsList{
// Value: []armsecurity.ServerVulnerabilityAssessmentsSettingClassification{
// &armsecurity.AzureServersSetting{
// Name: to.Ptr("azureServersSetting"),
// Type: to.Ptr("Microsoft.Security/serverVulnerabilityAssessmentsSettings"),
// ID: to.Ptr("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/azureServersSetting"),
// SystemData: &armsecurity.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
// CreatedBy: to.Ptr("user@contoso.com"),
// CreatedByType: to.Ptr(armsecurity.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-12T13:47:50.328Z"); return t}()),
// LastModifiedBy: to.Ptr("user@contoso.com"),
// LastModifiedByType: to.Ptr(armsecurity.CreatedByTypeUser),
// },
// Kind: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsSettingKindAzureServersSetting),
// Properties: &armsecurity.ServerVulnerabilityAssessmentsAzureSettingProperties{
// SelectedProvider: to.Ptr(armsecurity.ServerVulnerabilityAssessmentsAzureSettingSelectedProviderMdeTvm),
// },
// }},
// }
}
}
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 Get a list of all the server vulnerability assessments settings over a subscription level scope
*
* @summary Get a list of all the server vulnerability assessments settings over a subscription level scope
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_example.json
*/
async function listTheServerVulnerabilityAssessmentsSettingsSetOnTheSubscription() {
const subscriptionId =
process.env["SECURITY_SUBSCRIPTION_ID"] || "20ff7fc3-e762-44dd-bd96-b71116dcdc23";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.serverVulnerabilityAssessmentsSettings.listBySubscription()) {
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.Resources;
using Azure.ResourceManager.SecurityCenter;
using Azure.ResourceManager.SecurityCenter.Models;
// Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2023-05-01/examples/ServerVulnerabilityAssessmentsSettings/ListServerVulnerabilityAssessmentsSettings_example.json
// this example is just showing the usage of "ServerVulnerabilityAssessmentsSettings_ListBySubscription" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "20ff7fc3-e762-44dd-bd96-b71116dcdc23";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this ServerVulnerabilityAssessmentsSettingResource
ServerVulnerabilityAssessmentsSettingCollection collection = subscriptionResource.GetServerVulnerabilityAssessmentsSettings();
// invoke the operation and iterate over the result
await foreach (ServerVulnerabilityAssessmentsSettingResource 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
ServerVulnerabilityAssessmentsSettingData 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/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/azureServersSetting",
"name": "azureServersSetting",
"type": "Microsoft.Security/serverVulnerabilityAssessmentsSettings",
"kind": "AzureServersSetting",
"properties": {
"selectedProvider": "MdeTvm"
},
"systemData": {
"createdBy": "user@contoso.com",
"createdByType": "User",
"createdAt": "2023-05-12T13:47:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-05-12T13:47:50.328Z"
}
}
]
}
定義
定義されたスコープ内の Azure サーバーでの脆弱性評価の設定。
名前 |
型 |
説明 |
id
|
string
|
リソースの完全修飾リソース ID。 例: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
kind
|
string:
AzureServersSetting
|
サーバーの脆弱性評価設定の種類。
|
name
|
string
|
リソースの名前
|
properties.selectedProvider
|
ServerVulnerabilityAssessmentsAzureSettingSelectedProvider
|
定義されたスコープ内の Azure サーバー上で選択された脆弱性評価プロバイダー。
|
systemData
|
systemData
|
createdBy と modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
type
|
string
|
リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
createdByType
リソースを作成した ID の種類。
名前 |
型 |
説明 |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorAdditionalInfo
リソース管理エラーの追加情報。
名前 |
型 |
説明 |
info
|
object
|
追加情報。
|
type
|
string
|
追加情報の種類。
|
ErrorDetail
エラーの詳細。
名前 |
型 |
説明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
エラーの追加情報。
|
code
|
string
|
エラー コード。
|
details
|
ErrorDetail[]
|
エラーの詳細。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
エラーターゲット。
|
ErrorResponse
エラー応答
ServerVulnerabilityAssessmentsAzureSettingSelectedProvider
定義されたスコープ内の Azure サーバー上で選択された脆弱性評価プロバイダー。
名前 |
型 |
説明 |
MdeTvm
|
string
|
Microsoft Defender for Endpoints の脅威と脆弱性の管理。
|
ServerVulnerabilityAssessmentsSettingKind
サーバーの脆弱性評価設定の種類
名前 |
型 |
説明 |
AzureServersSetting
|
string
|
|
ServerVulnerabilityAssessmentsSettingsList
サーバー脆弱性評価の設定一覧のページ
名前 |
型 |
説明 |
nextLink
|
string
|
次のページをフェッチする URI
|
value
|
ServerVulnerabilityAssessmentsSetting[]:
AzureServersSetting[]
|
このページのサーバー脆弱性評価設定のコレクション
|
systemData
リソースの作成と最後の変更に関連するメタデータ。
名前 |
型 |
説明 |
createdAt
|
string
|
リソース作成のタイムスタンプ (UTC)。
|
createdBy
|
string
|
リソースを作成した ID。
|
createdByType
|
createdByType
|
リソースを作成した ID の種類。
|
lastModifiedAt
|
string
|
リソースの最終変更のタイムスタンプ (UTC)
|
lastModifiedBy
|
string
|
リソースを最後に変更した ID。
|
lastModifiedByType
|
createdByType
|
リソースを最後に変更した ID の種類。
|