/** * <p> * The IDs of one or more resources, separated by spaces. * </p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * </p> * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTagsRequest withResources(java.util.Collection<String> resources) { setResources(resources); return this; }
/** * Constructs a new CreateTagsRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @param tags * One or more tags. The <code>value</code> parameter is required, but if you don't want the tag to have a * value, specify the parameter with no value, and we set the value to an empty string. */ public CreateTagsRequest(java.util.List<String> resources, java.util.List<Tag> tags) { setResources(resources); setTags(tags); }
/** * <p> * The IDs of one or more resources, separated by spaces. * </p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to * override the existing values. * </p> * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTagsRequest withResources(String... resources) { if (this.resources == null) { setResources(new com.amazonaws.internal.SdkInternalList<String>(resources.length)); } for (String ele : resources) { this.resources.add(ele); } return this; }
/** * Constructs a new CreateTagsRequest object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param resources The IDs of one or more resources to tag. For example, * ami-1a2b3c4d. * @param tags One or more tags. The <code>value</code> parameter is * required, but if you don't want the tag to have a value, specify the * parameter with no value, and we set the value to an empty string. */ public CreateTagsRequest(java.util.List<String> resources, java.util.List<Tag> tags) { setResources(resources); setTags(tags); }
/** * The IDs of one or more resources to tag. For example, ami-1a2b3c4d. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param resources The IDs of one or more resources to tag. For example, ami-1a2b3c4d. * * @return A reference to this updated object so that method calls can be chained * together. */ public CreateTagsRequest withResources(String... resources) { if (getResources() == null) setResources(new java.util.ArrayList<String>(resources.length)); for (String value : resources) { getResources().add(value); } return this; }
/** * <p> * The IDs of one or more resources, separated by spaces. * </p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * </p> * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTagsRequest withResources(java.util.Collection<String> resources) { setResources(resources); return this; }
/** * Constructs a new CreateTagsRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @param tags * One or more tags. The <code>value</code> parameter is required, but if you don't want the tag to have a * value, specify the parameter with no value, and we set the value to an empty string. */ public CreateTagsRequest(java.util.List<String> resources, java.util.List<Tag> tags) { setResources(resources); setTags(tags); }
/** * <p> * The IDs of one or more resources, separated by spaces. * </p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to * override the existing values. * </p> * * @param resources * The IDs of one or more resources, separated by spaces.</p> * <p> * Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTagsRequest withResources(String... resources) { if (this.resources == null) { setResources(new com.amazonaws.internal.SdkInternalList<String>(resources.length)); } for (String ele : resources) { this.resources.add(ele); } return this; }
tags.add(new Tag("Name","s3BktLdr-wkr-"+dateStr)); tagRequest.setResources(amiIds); tagRequest.setTags(tags);