public static final class InstallMonitoringAgentRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
InstallMonitoringAgentRequest |
build() |
InstallMonitoringAgentRequest.Builder |
force(Boolean force)
Specifies whether to install the CloudMonitor agent.
|
InstallMonitoringAgentRequest.Builder |
installCommand(String installCommand)
Specifies whether to install the CloudMonitor agent on all ECS instances that belong to the current Alibaba Cloud account.
|
InstallMonitoringAgentRequest.Builder |
instanceIds(List<String> instanceIds)
InstanceIds.
|
public InstallMonitoringAgentRequest.Builder force(Boolean force)
Specifies whether to install the CloudMonitor agent. Valid values:
true
public InstallMonitoringAgentRequest.Builder installCommand(String installCommand)
Specifies whether to install the CloudMonitor agent on all ECS instances that belong to the current Alibaba Cloud account. Valid values:
onlyInstallNotHasAgent: installs the latest version of the CloudMonitor agent only on ECS instances on which the agent is not installed.onlyUpgradeAgent: upgrades the CloudMonitor agent to the latest version only for ECS instances on which an earlier version of the agent is installed.installAndUpgrade: installs the latest version of the CloudMonitor agent on ECS instances on which the agent is not installed, and upgrades the CloudMonitor agent to the latest version for ECS instances on which an earlier version of the agent is installed.example:If you set the InstallCommand parameter, the
InstanceIdsparameter does not take effect.
onlyInstallNotHasAgent
public InstallMonitoringAgentRequest.Builder instanceIds(List<String> instanceIds)
public InstallMonitoringAgentRequest build()
Copyright © 2026. All rights reserved.