use of software.amazon.awssdk.services.s3control.model.CreateMultiRegionAccessPointResponse in project aws-sdk-java-v2 by aws.
the class S3MrapIntegrationTest method createMrapIfNotExist.
private static void createMrapIfNotExist(String mrapName) {
software.amazon.awssdk.services.s3control.model.Region mrapRegion = software.amazon.awssdk.services.s3control.model.Region.builder().bucket(bucket).build();
if (s3control.listMultiRegionAccessPoints(r -> r.accountId(accountId)).accessPoints().stream().noneMatch(a -> a.name().equals(S3MrapIntegrationTest.mrapName))) {
CreateMultiRegionAccessPointInput details = CreateMultiRegionAccessPointInput.builder().name(mrapName).regions(mrapRegion).build();
log.info(() -> "Creating MRAP: " + mrapName);
CreateMultiRegionAccessPointResponse response = s3control.createMultiRegionAccessPoint(r -> r.accountId(accountId).details(details));
waitForResourceCreation(mrapName);
}
}
Aggregations