当前位置: 首页>>代码示例>>Java>>正文


Java DBInstance.setEndpoint方法代码示例

本文整理汇总了Java中com.amazonaws.services.rds.model.DBInstance.setEndpoint方法的典型用法代码示例。如果您正苦于以下问题:Java DBInstance.setEndpoint方法的具体用法?Java DBInstance.setEndpoint怎么用?Java DBInstance.setEndpoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amazonaws.services.rds.model.DBInstance的用法示例。


在下文中一共展示了DBInstance.setEndpoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeInstance

import com.amazonaws.services.rds.model.DBInstance; //导入方法依赖的package包/类
private DBInstance makeInstance(String instanceName, RdsInstanceStatus instanceStatus)
{
  DBInstance dbInstance = new DBInstance();
  dbInstance.setDBInstanceIdentifier(instanceName);
  dbInstance.setDBInstanceStatus(instanceStatus == null ? UNKNOWN_STATUS : instanceStatus.toString());
  Endpoint endpoint = new Endpoint();
  endpoint.setAddress(STAGE_ENDPOINT_ADDRESS);
  dbInstance.setEndpoint(endpoint);
  DBSubnetGroup dbSubnetGroup = new DBSubnetGroup();
  dbSubnetGroup.setDBSubnetGroupName(SUBNET_GROUP);
  dbInstance.setDBSubnetGroup(dbSubnetGroup);
  return dbInstance;
}
 
开发者ID:Nike-Inc,项目名称:bluegreen-manager,代码行数:14,代码来源:RdsSnapshotRestoreTaskTest.java

示例2: setUp

import com.amazonaws.services.rds.model.DBInstance; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    this.clientProviderMock = mock(ClientProvider.class);
    this.jobsPropertiesMock = mock(JobsProperties.class);
    this.violationSinkMock = mock(ViolationSink.class);
    this.amazonRDSClientMock = mock(AmazonRDSClient.class);
    this.accountIdSupplierMock = mock(AccountIdSupplier.class);
    this.exceptionHandlerMock = mock(JobExceptionHandler.class);

    when(accountIdSupplierMock.get()).thenReturn(newHashSet("54321"));

    // Jobsproperties
    when(jobsPropertiesMock.getWhitelistedRegions()).thenReturn(newArrayList("eu-west-1"));

    // Dbinstances
    final Endpoint endpoint = new Endpoint();
    endpoint.setAddress("aws.db.cn");
    final Endpoint endpoint2 = new Endpoint();
    endpoint2.setAddress("aws.db2.cn");
    final DBInstance dbInstance1 = new DBInstance();
    dbInstance1.setPubliclyAccessible(true);
    dbInstance1.setEndpoint(endpoint);
    final DBInstance dbInstance2 = new DBInstance();
    dbInstance2.setPubliclyAccessible(false);
    dbInstance2.setEndpoint(endpoint);
    final DBInstance dbInstance3 = new DBInstance();
    dbInstance3.setPubliclyAccessible(true);
    dbInstance3.setEndpoint(endpoint2);
    describeDBInstancesResultMock = new DescribeDBInstancesResult();
    describeDBInstancesResultMock.setDBInstances(newArrayList(dbInstance1, dbInstance2, dbInstance3));

    // clientprovider
    when(clientProviderMock.getClient(any(), any(String.class), any(Region.class))).thenReturn(amazonRDSClientMock);

}
 
开发者ID:zalando-stups,项目名称:fullstop,代码行数:36,代码来源:FetchRdsJobTest.java


注:本文中的com.amazonaws.services.rds.model.DBInstance.setEndpoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。