public static final class UpsertCollectionPolicyRequest.PolicyConfig.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
UpsertCollectionPolicyRequest.PolicyConfig |
build() |
UpsertCollectionPolicyRequest.PolicyConfig.Builder |
instanceIds(List<String> instanceIds)
The IDs of the instances.
|
UpsertCollectionPolicyRequest.PolicyConfig.Builder |
regions(List<String> regions)
The regions of the instances.
|
UpsertCollectionPolicyRequest.PolicyConfig.Builder |
resourceMode(String resourceMode)
The resource collection mode.
|
UpsertCollectionPolicyRequest.PolicyConfig.Builder |
resourceTags(Map<String,?> resourceTags)
The resource tags.
|
public UpsertCollectionPolicyRequest.PolicyConfig.Builder instanceIds(List<String> instanceIds)
The IDs of the instances. This parameter takes effect only when resourceMode is set to instanceMode. Logs are collected only from instances that use the specified IDs.
public UpsertCollectionPolicyRequest.PolicyConfig.Builder regions(List<String> regions)
The regions of the instances. This parameter takes effect only when resourceMode is set to attributeMode. Wildcard characters are supported. If you leave this parameter empty, region-based filtering is not performed. The system considers that all instances are matched. If you specify a value for this parameter, logs of instances that reside in the specified regions are collected. Logs are collected from an instance only if the resource tags and region of the instance match the specified conditions.
public UpsertCollectionPolicyRequest.PolicyConfig.Builder resourceMode(String resourceMode)
The resource collection mode. Valid values: all, attributeMode, and instanceMode. The value all specifies that logs of all instances within your account are collected to the default logstore. The value attributeMode specifies that logs are collected based on the regions of instances and resource tags. The value instanceMode specifies that logs are collected based on instance IDs.
This parameter is required.
example:all
public UpsertCollectionPolicyRequest.PolicyConfig.Builder resourceTags(Map<String,?> resourceTags)
The resource tags. This parameter takes effect only when resourceMode is set to attributeMode. If you leave this parameter empty, resource tag-based filtering is not performed. The system considers that all instances are matched. If you specify a value for this parameter, logs of instances that use the specified resource tags are collected. Logs are collected from an instance only if the resource tags and region of the instance match the specified conditions.
example:{"tag1":"value1",“tag2":"value2"}
public UpsertCollectionPolicyRequest.PolicyConfig build()
Copyright © 2025. All rights reserved.