/** * <p> * The names of one or more policies. If you omit this parameter, all policies are described. If a group name is * provided, the results are limited to that group. This list is limited to 50 items. If you specify an unknown * policy name, it is ignored with no error. * </p> * * @param policyNames * The names of one or more policies. If you omit this parameter, all policies are described. If a group name * is provided, the results are limited to that group. This list is limited to 50 items. If you specify an * unknown policy name, it is ignored with no error. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyNames(java.util.Collection<String> policyNames) { setPolicyNames(policyNames); return this; }
/** * <p> * The names of one or more policies. If you omit this parameter, all policies are described. If a group name is * provided, the results are limited to that group. This list is limited to 50 items. If you specify an unknown * policy name, it is ignored with no error. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setPolicyNames(java.util.Collection)} or {@link #withPolicyNames(java.util.Collection)} if you want to * override the existing values. * </p> * * @param policyNames * The names of one or more policies. If you omit this parameter, all policies are described. If a group name * is provided, the results are limited to that group. This list is limited to 50 items. If you specify an * unknown policy name, it is ignored with no error. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyNames(String... policyNames) { if (this.policyNames == null) { setPolicyNames(new com.amazonaws.internal.SdkInternalList<String>(policyNames.length)); } for (String ele : policyNames) { this.policyNames.add(ele); } return this; }
/** * <p> * The names of one or more policies. If you omit this parameter, all * policies are described. If a group name is provided, the results are * limited to that group. This list is limited to 50 items. If you specify * an unknown policy name, it is ignored with no error. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param policyNames <p> * The names of one or more policies. If you omit this parameter, * all policies are described. If a group name is provided, the * results are limited to that group. This list is limited to 50 * items. If you specify an unknown policy name, it is ignored * with no error. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribePoliciesRequest withPolicyNames(java.util.Collection<String> policyNames) { setPolicyNames(policyNames); return this; }