/** * <p> * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * </p> * * @param owners * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withOwners(java.util.Collection<String> owners) { setOwners(owners); return this; }
/** * <p> * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setOwners(java.util.Collection)} or {@link #withOwners(java.util.Collection)} if you want to override the * existing values. * </p> * * @param owners * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withOwners(String... owners) { if (this.owners == null) { setOwners(new com.amazonaws.internal.SdkInternalList<String>(owners.length)); } for (String ele : owners) { this.owners.add(ele); } return this; }
/** * Filters the images by the owner. Specify an AWS account ID, * <code>amazon</code> (owner is Amazon), <code>aws-marketplace</code> * (owner is AWS Marketplace), <code>self</code> (owner is the sender of * the request). Omitting this option returns all images for which you * have launch permissions, regardless of ownership. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param owners Filters the images by the owner. Specify an AWS account ID, * <code>amazon</code> (owner is Amazon), <code>aws-marketplace</code> * (owner is AWS Marketplace), <code>self</code> (owner is the sender of * the request). Omitting this option returns all images for which you * have launch permissions, regardless of ownership. * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeImagesRequest withOwners(String... owners) { if (getOwners() == null) setOwners(new java.util.ArrayList<String>(owners.length)); for (String value : owners) { getOwners().add(value); } return this; }
/** * <p> * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * </p> * * @param owners * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withOwners(java.util.Collection<String> owners) { setOwners(owners); return this; }
/** * <p> * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setOwners(java.util.Collection)} or {@link #withOwners(java.util.Collection)} if you want to override the * existing values. * </p> * * @param owners * Filters the images by the owner. Specify an AWS account ID, <code>self</code> (owner is the sender of the * request), or an AWS owner alias (valid values are <code>amazon</code> | <code>aws-marketplace</code> | * <code>microsoft</code>). Omitting this option returns all images for which you have launch permissions, * regardless of ownership. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeImagesRequest withOwners(String... owners) { if (this.owners == null) { setOwners(new com.amazonaws.internal.SdkInternalList<String>(owners.length)); } for (String ele : owners) { this.owners.add(ele); } return this; }
DescribeImagesRequest request = new DescribeImagesRequest(); request.setImageIds(images); request.setOwners(owners); request.setExecutableUsers(users); List<Image> img = ec2.describeImages(request).getImages();
DescribeImagesRequest request = new DescribeImagesRequest(); request.setImageIds(images); request.setOwners(owners); request.setExecutableUsers(users); List<Image> img = ec2.describeImages(request).getImages();