/** * <p> * The tags to be assigned to the Amazon RDS resource. * </p> * * @param tags * The tags to be assigned to the Amazon RDS resource. * @return Returns a reference to this object so that method calls can be chained together. */ public AddTagsToResourceRequest withTags(java.util.Collection<Tag> tags) { setTags(tags); return this; }
/** * <p> * The tags to be assigned to the Amazon RDS resource. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. * </p> * * @param tags * The tags to be assigned to the Amazon RDS resource. * @return Returns a reference to this object so that method calls can be chained together. */ public AddTagsToResourceRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; }
/** * <p> * The tags to be assigned to the Amazon RDS resource. * </p> * * @param tags * The tags to be assigned to the Amazon RDS resource. * @return Returns a reference to this object so that method calls can be chained together. */ public AddTagsToResourceRequest withTags(java.util.Collection<Tag> tags) { setTags(tags); return this; }
/** * <p> * The tags to be assigned to the Amazon RDS resource. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. * </p> * * @param tags * The tags to be assigned to the Amazon RDS resource. * @return Returns a reference to this object so that method calls can be chained together. */ public AddTagsToResourceRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; }
/** * * @param resourceId * @param clientMap * @param pacTag * @return */ private Boolean setRDSDBTag(final String resourceId, final Map<String, Object> clientMap, Map<String, String> pacTag ) { AmazonRDS rdsClient = (AmazonRDS) clientMap.get("client"); com.amazonaws.services.rds.model.Tag tag = new com.amazonaws.services.rds.model.Tag(); for(Map.Entry<String, String> tags : pacTag.entrySet()){ tag.setKey(tags.getKey()); tag.setValue(tags.getValue()); } AddTagsToResourceRequest request = new AddTagsToResourceRequest().withResourceName(resourceId); request.setTags(Arrays.asList(tag)); try { AddTagsToResourceResult response = rdsClient.addTagsToResource(request); return Boolean.TRUE; } catch (AmazonServiceException ase) { logger.error("error tagging rds - > " + resourceId, ase); throw ase; } } /**