本文整理汇总了Java中com.amazonaws.services.rds.model.VpcSecurityGroupMembership类的典型用法代码示例。如果您正苦于以下问题:Java VpcSecurityGroupMembership类的具体用法?Java VpcSecurityGroupMembership怎么用?Java VpcSecurityGroupMembership使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VpcSecurityGroupMembership类属于com.amazonaws.services.rds.model包,在下文中一共展示了VpcSecurityGroupMembership类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeDBInstanceWithSecurityGroups
import com.amazonaws.services.rds.model.VpcSecurityGroupMembership; //导入依赖的package包/类
/**
* Test helper - makes a DBInstance having the specified security group names.
*/
private DBInstance makeDBInstanceWithSecurityGroups(String... securityGroupIds)
{
DBInstance dbInstance = new DBInstance();
dbInstance.setDBInstanceIdentifier(INSTANCE_NAME);
if (ArrayUtils.isNotEmpty(securityGroupIds))
{
List<VpcSecurityGroupMembership> securityGroups = new ArrayList<VpcSecurityGroupMembership>();
for (String securityGroupId : securityGroupIds)
{
securityGroups.add(makeVpcSecurityGroupMembership(securityGroupId));
}
dbInstance.setVpcSecurityGroups(securityGroups);
}
return dbInstance;
}
示例2: extractVpcSecurityGroupIds
import com.amazonaws.services.rds.model.VpcSecurityGroupMembership; //导入依赖的package包/类
/**
* Extracts the VPC security group ids from the instance.
*/
public Collection<String> extractVpcSecurityGroupIds(DBInstance dbInstance)
{
if (dbInstance != null && CollectionUtils.isNotEmpty(dbInstance.getVpcSecurityGroups()))
{
List<String> ids = new ArrayList<String>();
for (VpcSecurityGroupMembership group : dbInstance.getVpcSecurityGroups())
{
ids.add(group.getVpcSecurityGroupId());
}
return ids;
}
return null;
}
示例3: makeVpcSecurityGroupMembership
import com.amazonaws.services.rds.model.VpcSecurityGroupMembership; //导入依赖的package包/类
private VpcSecurityGroupMembership makeVpcSecurityGroupMembership(String securityGroupId)
{
VpcSecurityGroupMembership securityGroup = new VpcSecurityGroupMembership();
securityGroup.setVpcSecurityGroupId(securityGroupId);
return securityGroup;
}