Пример #1
0
  @Override
  public void doWork() throws BuildException {
    DescribeTagsRequest request =
        filters != null ? new DescribeTagsRequest(filters) : new DescribeTagsRequest();

    DescribeTagsResult result = getEc2Client().describeTags(request);
    if (result == null || result.getTags() == null || result.getTags().isEmpty()) {
      return;
    }

    for (TagDescription desc : result.getTags()) {
      if (resourceIdArray != null) {
        ArrayManager.add(resourceIdArray, desc.getResourceId());
      }

      if (resourceTypeArray != null) {
        ArrayManager.add(resourceTypeArray, desc.getResourceType());
      }

      if (keysArray != null) {
        ArrayManager.add(keysArray, desc.getKey());
      }

      if (valuesArray != null) {
        ArrayManager.add(valuesArray, desc.getValue());
      }
    }
  }
Пример #2
0
  public void setValuesArray(String array) {
    if (ArrayManager.exists(array)) {
      throw new BuildException("Specified array doesn't exist");
    }

    this.valuesArray = array;
  }
Пример #3
0
  public void setResourceTypeArray(String array) {
    if (ArrayManager.exists(array)) {
      throw new BuildException("Specified array doesn't exist");
    }

    this.resourceTypeArray = array;
  }