Java 类com.amazonaws.services.ec2.model.GetPasswordDataResult 实例源码

项目:primecloud-controller    文件:AwsInstanceProcess.java   
public void waitGetPasswordData(AwsProcessClient awsProcessClient, Long instanceNo) {
    AwsInstance awsInstance = awsInstanceDao.read(instanceNo);
    String instanceId = awsInstance.getInstanceId();

    GetPasswordDataRequest request = new GetPasswordDataRequest();
    request.withInstanceId(instanceId);

    while (true) {
        GetPasswordDataResult result = awsProcessClient.getEc2Client().getPasswordData(request);

        if (StringUtils.isNotEmpty(result.getPasswordData())) {
            break;
        }

        try {
            Thread.sleep(1000L * awsProcessClient.getDescribeInterval());
        } catch (InterruptedException ignore) {
        }
    }
}
项目:primecloud-controller    文件:AwsDescribeServiceImpl.java   
protected String getPasswordData(Long instanceNo) {
    Instance instance = instanceDao.read(instanceNo);
    Farm farm = farmDao.read(instance.getFarmNo());
    AwsProcessClient awsProcessClient = awsProcessClientFactory.createAwsProcessClient(farm.getUserNo(),
            instance.getPlatformNo());

    AwsInstance awsInstance = awsInstanceDao.read(instanceNo);

    // パスワードデータの取得
    GetPasswordDataRequest request = new GetPasswordDataRequest();
    request.withInstanceId(awsInstance.getInstanceId());
    GetPasswordDataResult result = awsProcessClient.getEc2Client().getPasswordData(request);
    return result.getPasswordData();
}
项目:aws-sdk-java-resources    文件:InstanceImpl.java   
@Override
public GetPasswordDataResult passwordData(GetPasswordDataRequest request,
        ResultCapture<GetPasswordDataResult> extractor) {

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

    if (result == null) return null;
    return (GetPasswordDataResult) result.getData();
}
项目:aws-sdk-java-resources    文件:InstanceImpl.java   
@Override
public GetPasswordDataResult passwordData(
        ResultCapture<GetPasswordDataResult> extractor) {

    GetPasswordDataRequest request = new GetPasswordDataRequest();
    return passwordData(request, extractor);
}
项目:elasticsearch_my    文件:AmazonEC2Mock.java   
@Override
public GetPasswordDataResult getPasswordData(GetPasswordDataRequest getPasswordDataRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}
项目:aws-sdk-java-resources    文件:InstanceImpl.java   
@Override
public GetPasswordDataResult passwordData(GetPasswordDataRequest request) {
    return passwordData(request, null);
}
项目:aws-sdk-java-resources    文件:InstanceImpl.java   
@Override
public GetPasswordDataResult passwordData() {
    return passwordData((ResultCapture<GetPasswordDataResult>)null);
}
项目:aws-sdk-java-resources    文件:Instance.java   
/**
 * Performs the <code>PasswordData</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>InstanceId</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 GetPasswordDataRequest
 */
GetPasswordDataResult passwordData(GetPasswordDataRequest request);
项目:aws-sdk-java-resources    文件:Instance.java   
/**
 * Performs the <code>PasswordData</code> action and use a ResultCapture to
 * retrieve the low-level client response.
 *
 * <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>InstanceId</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 GetPasswordDataRequest
 */
GetPasswordDataResult passwordData(GetPasswordDataRequest request,
        ResultCapture<GetPasswordDataResult> extractor);
项目:aws-sdk-java-resources    文件:Instance.java   
/**
 * The convenient method form for the <code>PasswordData</code> action.
 *
 * @see #passwordData(GetPasswordDataRequest)
 */
GetPasswordDataResult passwordData();
项目:aws-sdk-java-resources    文件:Instance.java   
/**
 * The convenient method form for the <code>PasswordData</code> action.
 *
 * @see #passwordData(GetPasswordDataRequest, ResultCapture)
 */
GetPasswordDataResult passwordData(ResultCapture<GetPasswordDataResult>
        extractor);