if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getRoleName() != null) sb.append("RoleName: ").append(getRoleName()).append(","); if (getRoleId() != null) sb.append("RoleId: ").append(getRoleId()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getRoleName() == null) ? 0 : getRoleName().hashCode()); hashCode = prime * hashCode + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getAssumeRolePolicyDocument() == null) ? 0 : getAssumeRolePolicyDocument().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getMaxSessionDuration() == null) ? 0 : getMaxSessionDuration().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getRoleName() == null ^ this.getRoleName() == null) return false; if (other.getRoleName() != null && other.getRoleName().equals(this.getRoleName()) == false) return false; if (other.getRoleId() == null ^ this.getRoleId() == null)
@Override public AbstractModelList<String> getEmrRolesFromAmazonAccount() { List<Role> emrRolesList = aim.listRoles().getRoles(); AbstractModelList<String> emrList; emrList = emrRolesList.stream().filter( e -> e.getAssumeRolePolicyDocument().contains( "elasticmapreduce" ) ) .map( e -> e.getRoleName() ).collect( Collectors.toCollection( AbstractModelList<String>::new ) ); return emrList; } }
if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getRoleName() != null) sb.append("RoleName: ").append(getRoleName()).append(","); if (getRoleId() != null) sb.append("RoleId: ").append(getRoleId()).append(",");
ImmutableMap.of( "role_arn", role.getArn(), "role_name", role.getRoleName(), "grantees", crossAccountArns), role.getRoleId()
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getRoleName() == null) ? 0 : getRoleName().hashCode()); hashCode = prime * hashCode + ((getRoleId() == null) ? 0 : getRoleId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getAssumeRolePolicyDocument() == null) ? 0 : getAssumeRolePolicyDocument().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getMaxSessionDuration() == null) ? 0 : getMaxSessionDuration().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getRoleName() == null ^ this.getRoleName() == null) return false; if (other.getRoleName() != null && other.getRoleName().equals(this.getRoleName()) == false) return false; if (other.getRoleId() == null ^ this.getRoleId() == null)
.listRolePolicies(new ListRolePoliciesRequest().withRoleName(role.getRoleName())); long timestamp = System.currentTimeMillis(); for (String policyName : rolePolicies.getPolicyNames()) { GetRolePolicyResult rolePolicy = iam.getRolePolicy( new GetRolePolicyRequest().withRoleName(role.getRoleName()).withPolicyName(policyName)); String policyCypher = "match (n:AwsIamRole { aws_arn: {a} })" + "merge (n)-[r:CONTAINS]->(p:AwsInlinePolicy { aws_owner_arn: {a}, aws_policyName: {n} })"