當前位置: 首頁>>代碼示例>>Java>>正文


Java UnmonitorInstancesResult類代碼示例

本文整理匯總了Java中com.amazonaws.services.ec2.model.UnmonitorInstancesResult的典型用法代碼示例。如果您正苦於以下問題:Java UnmonitorInstancesResult類的具體用法?Java UnmonitorInstancesResult怎麽用?Java UnmonitorInstancesResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


UnmonitorInstancesResult類屬於com.amazonaws.services.ec2.model包,在下文中一共展示了UnmonitorInstancesResult類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: unmonitorInstances

import com.amazonaws.services.ec2.model.UnmonitorInstancesResult; //導入依賴的package包/類
private void unmonitorInstances(AmazonEC2Client ec2Client, Exchange exchange) {
    Collection instanceIds;
    UnmonitorInstancesRequest request = new UnmonitorInstancesRequest();
    if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EC2Constants.INSTANCES_IDS))) {
        instanceIds = exchange.getIn().getHeader(EC2Constants.INSTANCES_IDS, Collection.class);
        request.withInstanceIds(instanceIds);
    } else {
        throw new IllegalArgumentException("Instances Ids must be specified");
    }
    UnmonitorInstancesResult result;
    try {
        result = ec2Client.unmonitorInstances(request);
    } catch (AmazonServiceException ase) {
        LOG.trace("Unmonitor Instances command returned the error code {}", ase.getErrorCode());
        throw ase;
    }
    LOG.trace("Stop Monitoring instances with Ids [{}] ", Arrays.toString(instanceIds.toArray()));
    Message message = getMessageForResponse(exchange);
    message.setBody(result); 
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:21,代碼來源:EC2Producer.java

示例2: unmonitorInstances

import com.amazonaws.services.ec2.model.UnmonitorInstancesResult; //導入依賴的package包/類
@Override
public UnmonitorInstancesResult unmonitorInstances(UnmonitorInstancesRequest unmonitorInstancesRequest) {
    UnmonitorInstancesResult result = new UnmonitorInstancesResult();
    if (!unmonitorInstancesRequest.getInstanceIds().isEmpty()) {
        Collection<InstanceMonitoring> coll = new ArrayList();
        Iterator it = unmonitorInstancesRequest.getInstanceIds().iterator();
        while (it.hasNext()) {
            String id = (String) it.next();
            InstanceMonitoring mon = new InstanceMonitoring();
            mon.setInstanceId(id);
            Monitoring monitoring = new Monitoring();
            monitoring.setState(MonitoringState.Disabled);
            mon.setMonitoring(monitoring); 
            coll.add(mon);
        }
        result.setInstanceMonitorings(coll);
    }
    return result;
}
 
開發者ID:HydAu,項目名稱:Camel,代碼行數:20,代碼來源:AmazonEC2ClientMock.java

示例3: unmonitor

import com.amazonaws.services.ec2.model.UnmonitorInstancesResult; //導入依賴的package包/類
@Override
public UnmonitorInstancesResult unmonitor(UnmonitorInstancesRequest request,
        ResultCapture<UnmonitorInstancesResult> extractor) {

    ActionResult result = resource.performAction("Unmonitor", request,
            extractor);

    if (result == null) return null;
    return (UnmonitorInstancesResult) result.getData();
}
 
開發者ID:awslabs,項目名稱:aws-sdk-java-resources,代碼行數:11,代碼來源:InstanceImpl.java

示例4: unmonitorInstances

import com.amazonaws.services.ec2.model.UnmonitorInstancesResult; //導入依賴的package包/類
@Override
public UnmonitorInstancesResult unmonitorInstances(UnmonitorInstancesRequest unmonitorInstancesRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:5,代碼來源:AmazonEC2Mock.java

示例5: unmonitor

import com.amazonaws.services.ec2.model.UnmonitorInstancesResult; //導入依賴的package包/類
/**
 * Performs the <code>Unmonitor</code> action.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>Instance</code> resource, and any conflicting parameter value set
 * in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>InstanceIds.0</code></b>
 *         - mapped from the <code>Id</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @return The response of the low-level client operation associated with
 *         this resource action.
 * @see UnmonitorInstancesRequest
 */
UnmonitorInstancesResult unmonitor(UnmonitorInstancesRequest request);
 
開發者ID:awslabs,項目名稱:aws-sdk-java-resources,代碼行數:22,代碼來源:Instance.java


注:本文中的com.amazonaws.services.ec2.model.UnmonitorInstancesResult類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。