Example usage for com.amazonaws.services.cloudfront.model CloudFrontOriginAccessIdentityConfig CloudFrontOriginAccessIdentityConfig

List of usage examples for com.amazonaws.services.cloudfront.model CloudFrontOriginAccessIdentityConfig CloudFrontOriginAccessIdentityConfig

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudfront.model CloudFrontOriginAccessIdentityConfig CloudFrontOriginAccessIdentityConfig.

Prototype

public CloudFrontOriginAccessIdentityConfig() 

Source Link

Document

Default constructor for CloudFrontOriginAccessIdentityConfig object.

Usage

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  .com*/
}