/** * <p> * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> (the * sender of the request), or <code>all</code> (public AMIs). * </p> * * @param executableUsers * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> * (the sender of the request), or <code>all</code> (public AMIs). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withExecutableUsers(java.util.Collection<String> executableUsers) { setExecutableUsers(executableUsers); return this; }
/** * <p> * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> (the * sender of the request), or <code>all</code> (public AMIs). * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setExecutableUsers(java.util.Collection)} or {@link #withExecutableUsers(java.util.Collection)} if you * want to override the existing values. * </p> * * @param executableUsers * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> * (the sender of the request), or <code>all</code> (public AMIs). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withExecutableUsers(String... executableUsers) { if (this.executableUsers == null) { setExecutableUsers(new com.amazonaws.internal.SdkInternalList<String>(executableUsers.length)); } for (String ele : executableUsers) { this.executableUsers.add(ele); } return this; }
/** * Scopes the images by users with explicit launch permissions. Specify * an AWS account ID, <code>self</code> (the sender of the request), or * <code>all</code> (public AMIs). * <p> * Returns a reference to this object so that method calls can be chained together. * * @param executableUsers Scopes the images by users with explicit launch permissions. Specify * an AWS account ID, <code>self</code> (the sender of the request), or * <code>all</code> (public AMIs). * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeImagesRequest withExecutableUsers(String... executableUsers) { if (getExecutableUsers() == null) setExecutableUsers(new java.util.ArrayList<String>(executableUsers.length)); for (String value : executableUsers) { getExecutableUsers().add(value); } return this; }
/** * <p> * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> (the * sender of the request), or <code>all</code> (public AMIs). * </p> * * @param executableUsers * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> * (the sender of the request), or <code>all</code> (public AMIs). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withExecutableUsers(java.util.Collection<String> executableUsers) { setExecutableUsers(executableUsers); return this; }
/** * <p> * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> (the * sender of the request), or <code>all</code> (public AMIs). * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setExecutableUsers(java.util.Collection)} or {@link #withExecutableUsers(java.util.Collection)} if you * want to override the existing values. * </p> * * @param executableUsers * Scopes the images by users with explicit launch permissions. Specify an AWS account ID, <code>self</code> * (the sender of the request), or <code>all</code> (public AMIs). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withExecutableUsers(String... executableUsers) { if (this.executableUsers == null) { setExecutableUsers(new com.amazonaws.internal.SdkInternalList<String>(executableUsers.length)); } for (String ele : executableUsers) { this.executableUsers.add(ele); } return this; }
request.setImageIds(images); request.setOwners(owners); request.setExecutableUsers(users); List<Image> img = ec2.describeImages(request).getImages(); if (img == null || img.isEmpty()) {
request.setImageIds(images); request.setOwners(owners); request.setExecutableUsers(users); List<Image> img = ec2.describeImages(request).getImages(); if(img==null || img.isEmpty()) {