<p>
[VPC only] The outbound rules associated with the security group.
</p>

@param ipPermissionsEgress
[VPC only] The outbound rules associated with the security group.
335838
public void setIpPermissionsEgress(java.util.Collection<IpPermission> ipPermissionsEgress) {
        if (ipPermissionsEgress == null) {
            this.ipPermissionsEgress = null;
            return;
        }

        this.ipPermissionsEgress = new com.amazonaws.internal.SdkInternalList<IpPermission>(ipPermissionsEgress);
    }
418186
@Deprecated
    public IpPermission withIpRanges(java.util.Collection<String> ipRanges) {
        setIpRanges(ipRanges);
        return this;
    }
685235
public MockSecurityGroup createSecurityGroup(
            final String groupName, final String groupDescription, final String vpcId) {

        MockSecurityGroup ret = new MockSecurityGroup();
        ret.setGroupName(groupName);
        ret.setGroupDescription(groupDescription);
        ret.setGroupId(
                "sg-" + UUID.randomUUID().toString().substring(0, SECURITYGROUP_ID_POSTFIX_LENGTH));
        ret.setVpcId(vpcId);
        MockIpPermissionType mockIpPermissionType = new MockIpPermissionType();
        mockIpPermissionType.setIpProtocol("-1");
        List<String> ipRanges = new ArrayList<String>();
        ipRanges.add("0.0.0.0/0");
        mockIpPermissionType.setIpRanges(ipRanges);
        List<MockIpPermissionType> mockIpPermissionTypes = new ArrayList<MockIpPermissionType>();
        mockIpPermissionTypes.add(mockIpPermissionType);
        ret.setIpPermissionsEgress(mockIpPermissionTypes);
        List<MockIpPermissionType> mockIpPermissionTypesIngress = new ArrayList<MockIpPermissionType>();
        ret.setIpPermissions(mockIpPermissionTypesIngress);
        allMockSecurityGroup.put(ret.getGroupId(), ret);
        return ret;
    }
1102866
@Override
    public void update(IPermission perm) throws AuthorizationException {

        Connection conn = null;
        try {
            conn = RDBMServices.getConnection();
            String sQuery = getUpdatePermissionSql();
            if (log.isDebugEnabled()) log.debug("RDBMPermissionImpl.update(): " + sQuery);
            PreparedStatement ps = conn.prepareStatement(sQuery);
            try {
                primUpdate(perm, ps);
            } finally {
                ps.close();
            }
        } catch (Exception ex) {
            log.error("Exception updating permission [" + perm + "]", ex);
            throw new AuthorizationException("Problem updating Permission " + perm);
        } finally {
            RDBMServices.releaseConnection(conn);
        }
    }
636765
public void setVpcSecurityGroupIds(java.util.Collection<String> vpcSecurityGroupIds) {
        if (vpcSecurityGroupIds == null) {
            this.vpcSecurityGroupIds = null;
            return;
        }

        this.vpcSecurityGroupIds = new java.util.ArrayList<String>(vpcSecurityGroupIds);
    }
378276
public final boolean hasPermission(AccessControlList acl, String permission, Identity user)
      throws RepositoryException
   {
      return hasPermission(acl, parseStringPermissions(permission), user);
   }
812342
public IPersonAttributesGroupDefinition updatePagsDefinition(
            IPerson person, IPersonAttributesGroupDefinition pagsDef) {

        // Verify permission
        if (!hasPermission(
                person,
                IPermission.EDIT_GROUP_ACTIVITY,
                pagsDef.getCompositeEntityIdentifierForGroup().getKey())) {
            throw new RuntimeAuthorizationException(
                    person,
                    IPermission.EDIT_GROUP_ACTIVITY,
                    pagsDef.getCompositeEntityIdentifierForGroup().getKey());
        }

        IPersonAttributesGroupDefinition rslt =
                pagsGroupDefDao.updatePersonAttributesGroupDefinition(pagsDef);
        return rslt;
    }
637770
private IAuthorizationPrincipal[] getPrincipalsFromPermissions(IPermission[] permissions)
            throws AuthorizationException {
        Set principals = new HashSet();
        for (int i = 0; i < permissions.length; i++) {
            IAuthorizationPrincipal principal = getPrincipal(permissions[i]);
            principals.add(principal);
        }
        return ((IAuthorizationPrincipal[])
                principals.toArray(new IAuthorizationPrincipal[principals.size()]));
    }
954390
public static void addPermission(Permission perm)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();

    addPermission(perm, loader);
  }
1246836
@Override
    public void add(IPermission perm) throws AuthorizationException {

        Connection conn = null;
        int rc = 0;

        try {
            conn = RDBMServices.getConnection();
            String sQuery = getInsertPermissionSql();
            PreparedStatement ps = conn.prepareStatement(sQuery);
            try {
                primAdd(perm, ps);
                if (log.isDebugEnabled()) log.debug("RDBMPermissionImpl.add(): " + ps);
                rc = ps.executeUpdate();
                if (rc != 1) {
                    throw new AuthorizationException("Problem adding Permission " + perm);
                }
            } finally {
                ps.close();
            }
        } catch (Exception ex) {
            log.error("Exception adding permission [" + perm + "]", ex);
            throw new AuthorizationException("Problem adding Permission " + perm);
        } finally {
            RDBMServices.releaseConnection(conn);
        }
    }
75973
public void grantDefaultPermissions(GroupValue groupValue) {
    PackageIdentity packageIdentity = new PackageIdentity(groupValue.getRootPackage().getName());
    GroupIdentity groupIdentity = new GroupIdentity(groupValue.getName());
    aclService.createAcl(groupIdentity);
    groupValue
        .getRoles()
        .forEach(
            roleValue -> {
              PermissionSet permissionSet = PERMISSION_SETS_PER_ROLE.get(roleValue.getLabel());
              Sid roleSid = createRoleSid(roleValue.getName());
              permissionService.grant(packageIdentity, permissionSet, roleSid);
              permissionService.grant(groupIdentity, permissionSet, roleSid);
            });
    if (groupValue.isPublic()) {
      permissionService.grant(groupIdentity, READ, createAuthoritySid(AUTHORITY_USER));
    }
  }
451550
public java.util.List<StaleIpPermission> getStaleIpPermissionsEgress() {
        if (staleIpPermissionsEgress == null) {
            staleIpPermissionsEgress = new com.amazonaws.internal.SdkInternalList<StaleIpPermission>();
        }
        return staleIpPermissionsEgress;
    }
376350
private static void checkPermission() {
        SecurityManager security = System.getSecurityManager();
        if (security != null)
            security.checkPermission(modifyThreadPermission);
    }
364796
@Override
    public SecurityConfig setClientPermissionConfigs(Set<PermissionConfig> permissions) {
        if (securityService == null) {
            throw new UnsupportedOperationException("Unsupported operation");
        }
        securityService.refreshClientPermissions(permissions);
        return this;
    }
91815
protected void setPermissionStatus(PermissionStatus ps) {
    setUser(ps.getUserName());
    setGroup(ps.getGroupName());
    setPermission(ps.getPermission());
  }
736434
public static void checkSuperuserPrivilege(UserGroupInformation owner, 
                                             String supergroup) 
  throws AccessControlException {
    PermissionChecker checker = 
      new PermissionChecker(owner.getUserName(), supergroup);
    if (!checker.isSuper) {
      throw new AccessControlException("Access denied for user " 
          + checker.user + ". Superuser privilege is required");
    }
  }
665448
public boolean isPermissionDeclined(@NonNull String permissionsName) {
        return ActivityCompat.checkSelfPermission(context, permissionsName) != PackageManager.PERMISSION_GRANTED;
    }