Example usage for com.amazonaws.services.opsworks.model DescribeAppsResult getApps

List of usage examples for com.amazonaws.services.opsworks.model DescribeAppsResult getApps

Introduction

In this page you can find the example usage for com.amazonaws.services.opsworks.model DescribeAppsResult getApps.

Prototype


public java.util.List<App> getApps() 

Source Link

Document

An array of App objects that describe the specified apps.

Usage

From source file:com.tispr.aws.OpsWorksClient.java

License:Apache License

protected App getApp(String appId) {
    DescribeAppsRequest req = new DescribeAppsRequest().withAppIds(appId);
    DescribeAppsResult res = opsWorksClient.describeApps(req);

    for (App app : res.getApps()) {
        if (app.getAppId().equals(appId)) {
            return app;
        }/* www  .j a  v  a 2s .  c o m*/
    }
    throw new IllegalArgumentException(String.format("Application [%s] not found.", appId));
}