更新 tiIndicator
本文内容
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
更新 tiIndicator 对象 的属性。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限 。
权限类型
权限(从最低特权到最高特权)
委派(工作或学校帐户)
ThreatIndicators.ReadWrite.OwnedBy
委派(个人 Microsoft 帐户)
不支持。
应用程序
ThreatIndicators.ReadWrite.OwnedBy
HTTP 请求
PATCH /security/tiIndicators/{id}
名称
说明
Authorization
Bearer {code} 必填
Prefer
return=representation
请求正文
在请求正文中,提供应更新的相关字段的值。 请求正文中不包括的现有属性将保留其以前的值,或根据对其他属性值的更改重新计算。 为了获得最佳性能,请勿加入尚未更改的现有值。 所需字段包括 id expirationDateTime targetProduct :、、。
属性
类型
说明
action
string
当 targetProduct 安全工具中的指示器匹配时要应用的操作。 可取值为:unknown、allow、block、alert。
activityGroupNames
String 集合
网络威胁 (名称) 威胁指示器涵盖的恶意活动的各方提供。
additionalInformation
String
可以放置其他 tiIndicator 属性未覆盖的指示器的额外数据到的捕获区域。 放置在 additionalInformation 的数据通常不会由 targetProduct 安全工具使用。
confidence
Int32
表示指示器内数据准确识别恶意行为的置信度整数。 可接受的值为 0 – 100,100 为最高值。
说明
String
简要 (表示的威胁) 少于 100 个字符。
diamondModel
diamondModel
存在此指示器的菱形模型区域。 可取值为:unknown、adversary、capability、infrastructure、victim。
expirationDateTime
DateTimeOffset
指示指示器何时过期的 DateTime 字符串。 所有指示器都必须具有过期日期,以避免在系统中保留过时的指示器。 时间戳类型表示采用 ISO 8601 格式的日期和时间信息,始终采用 UTC 时区。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。
externalId
String
将指示器与指示器提供程序的系统系统连接在一起 (标识号,例如外键) 。
isActive
布尔
用于在系统内停用指示器。 默认情况下,提交的任何指示器都设置为活动。 但是,提供商可能会提交现有指示器(此设置为"False")来停用系统指示器。
killChain
killChain 集合
一个字符串的 JSON 数组,描述此指示器指向击杀链上的哪个点。 有关确切值,请参阅下面的"killChain 值"。
knownFalsePositives
String
指示符可能导致误报的方案。 这应该是可读文本。
lastReportedDateTime
DateTimeOffset
上一次看到指示器的时间。 时间戳类型表示采用 ISO 8601 格式的日期和时间信息,始终采用 UTC 时区。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。
malwareFamilyNames
String 集合
与指示器关联的恶意软件系列名称(如果存在)。 如果可以通过安全智能威胁中心找到,Microsoft 将尽可能Windows Defender Microsoft 恶意软件系列名称 。
passiveOnly
布尔
确定指示器是否应触发对最终用户可见的事件。 设置为"true"时,安全工具不会通知最终用户"点击"已发生。 这通常被安全产品视为审核或静默模式,在此模式下,安全产品只会记录发生匹配但不执行该操作。 默认值为 false。
severity
Int32
表示由指示器内的数据标识的恶意行为严重性的整数。 可接受的值为 0 – 5,其中 5 表示最严重,0 表示不严重。 默认值为 3。
标记
字符串集合
存储任意标记/关键字的字符串的 JSON 数组。
tlpLevel
tlpLevel
指示器的流量灯协议值。 可取值为:unknown、white、green、amber、red。
响应
如果成功,此方法返回 204 No Content 响应代码。
如果使用可选请求标头,则该方法在响应正文中返回 响应代码和更新的 200 OK tiIndicator 对象。
示例
请求
下面是一个没有 标头的请求 Prefer 示例。
PATCH https://graph.microsoft.com/beta/security/tiIndicators/{id}
Content-type: application/json
{
"description": "description-updated",
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var tiIndicator = new TiIndicator
{
Description = "description-updated"
};
await graphClient.Security.TiIndicators["{tiIndicator-id}"]
.Request()
.UpdateAsync(tiIndicator);
const options = {
authProvider,
};
const client = Client.init(options);
const tiIndicator = {
description: 'description-updated',
};
await client.api('/security/tiIndicators/{id}')
.version('beta')
.update(tiIndicator);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/security/tiIndicators/{id}"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphTiIndicator *tiIndicator = [[MSGraphTiIndicator alloc] init];
[tiIndicator setDescription:@"description-updated"];
NSError *error;
NSData *tiIndicatorData = [tiIndicator getSerializedDataWithError:&error];
[urlRequest setHTTPBody:tiIndicatorData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
TiIndicator tiIndicator = new TiIndicator();
tiIndicator.description = "description-updated";
graphClient.security().tiIndicators("{id}")
.buildRequest()
.patch(tiIndicator);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTiIndicator()
description := "description-updated"
requestBody.SetDescription(&description)
tiIndicatorId := "tiIndicator-id"
graphClient.Security().TiIndicatorsById(&tiIndicatorId).Patch(requestBody)
Import-Module Microsoft.Graph.Security
$params = @{
Description = "description-updated"
}
Update-MgSecurityTiIndicator -TiIndicatorId $tiIndicatorId -BodyParameter $params
响应
下面展示了示例响应。
HTTP/1.1 204 No Content
请求
下面是包含 标头的请求 Prefer 示例。
PATCH https://graph.microsoft.com/beta/security/tiIndicators/{id}
Content-type: application/json
Prefer: return=representation
{
"additionalInformation": "additionalInformation-after-update",
"confidence": 42,
"description": "description-after-update",
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var tiIndicator = new TiIndicator
{
AdditionalInformation = "additionalInformation-after-update",
Confidence = 42,
Description = "description-after-update"
};
await graphClient.Security.TiIndicators["{tiIndicator-id}"]
.Request()
.Header("Prefer","return=representation")
.UpdateAsync(tiIndicator);
const options = {
authProvider,
};
const client = Client.init(options);
const tiIndicator = {
additionalInformation: 'additionalInformation-after-update',
confidence: 42,
description: 'description-after-update',
};
await client.api('/security/tiIndicators/{id}')
.version('beta')
.update(tiIndicator);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/security/tiIndicators/{id}"]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"return=representation" forHTTPHeaderField:@"Prefer"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphTiIndicator *tiIndicator = [[MSGraphTiIndicator alloc] init];
[tiIndicator setAdditionalInformation:@"additionalInformation-after-update"];
[tiIndicator setConfidence: 42];
[tiIndicator setDescription:@"description-after-update"];
NSError *error;
NSData *tiIndicatorData = [tiIndicator getSerializedDataWithError:&error];
[urlRequest setHTTPBody:tiIndicatorData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<Option> requestOptions = new LinkedList<Option>();
requestOptions.add(new HeaderOption("Prefer", "return=representation"));
TiIndicator tiIndicator = new TiIndicator();
tiIndicator.additionalInformation = "additionalInformation-after-update";
tiIndicator.confidence = 42;
tiIndicator.description = "description-after-update";
graphClient.security().tiIndicators("{id}")
.buildRequest( requestOptions )
.patch(tiIndicator);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTiIndicator()
additionalInformation := "additionalInformation-after-update"
requestBody.SetAdditionalInformation(&additionalInformation)
confidence := int32(42)
requestBody.SetConfidence(&confidence)
description := "description-after-update"
requestBody.SetDescription(&description)
headers := map[string]string{
"Prefer": "return=representation"
}
options := &msgraphsdk.TiIndicatorRequestBuilderPatchRequestConfiguration{
Headers: headers,
}
tiIndicatorId := "tiIndicator-id"
graphClient.Security().TiIndicatorsById(&tiIndicatorId).PatchWithRequestConfigurationAndResponseHandler(requestBody, options, nil)
Import-Module Microsoft.Graph.Security
$params = @{
AdditionalInformation = "additionalInformation-after-update"
Confidence = 42
Description = "description-after-update"
}
Update-MgSecurityTiIndicator -TiIndicatorId $tiIndicatorId -BodyParameter $params
响应
下面展示了示例响应。
备注
为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Security/tiIndicators/$entity",
"id": "e58c072b-c9bb-a5c4-34ce-eb69af44fb1e",
"azureTenantId": "XXXXXXXXXXXXXXXXXXXXXXXXX",
"action": null,
"additionalInformation": "additionalInformation-after-update",
"activityGroupNames": [],
"confidence": 42,
"description": "description-after-update",
}