List of usage examples for com.amazonaws.services.cloudfront.model CreateCloudFrontOriginAccessIdentityRequest CreateCloudFrontOriginAccessIdentityRequest
public CreateCloudFrontOriginAccessIdentityRequest(
CloudFrontOriginAccessIdentityConfig cloudFrontOriginAccessIdentityConfig)
From source file:org.duracloud.s3task.streaming.EnableStreamingTaskRunner.java
License:Apache License
private String getOriginAccessId() { String oaId = getExistingOriginAccessId(); if (oaId != null) { // Use existing ID return oaId; } else { // Create a new ID return cfClient.createCloudFrontOriginAccessIdentity(new CreateCloudFrontOriginAccessIdentityRequest( new CloudFrontOriginAccessIdentityConfig().withCallerReference("" + System.currentTimeMillis()) .withComment("DuraCloud Origin Access ID"))) .getCloudFrontOriginAccessIdentity().getId(); }//from w w w. ja v a 2 s . c o m }