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

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

Introduction

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

Prototype

public CreateCloudFrontOriginAccessIdentityRequest(
        CloudFrontOriginAccessIdentityConfig cloudFrontOriginAccessIdentityConfig) 

Source Link

Document

Constructs a new CreateCloudFrontOriginAccessIdentityRequest 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  . c  o m
}