本文整理匯總了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;
}