StreamingDistribution streamingDistribution =
cloudFrontService.getStreamingDistributionInfo(testStreamingDistributionId);
System.out.println("Streaming Distribution: " + streamingDistribution);
// List configuration information about a streaming distribution
StreamingDistributionConfig streamingDistributionConfig =
cloudFrontService.getStreamingDistributionConfig(testStreamingDistributionId);
System.out.println("Streaming Distribution Config: " + streamingDistributionConfig);
// Update a streaming distribution's configuration to add an extra CNAME alias
// and to enable access logging -- logs will be written to '
StreamingDistributionConfig updatedStreamingDistributionConfig =
cloudFrontService.updateStreamingDistributionConfig(
testStreamingDistributionId,
null, // origin -- null for no changes
new String[] {"cname.jets3t-streaming.com"}, // CNAME aliases for distribution
"Updated this streaming distribution", // Comment
true, // Distribution enabled?
new LoggingStatus("jets3t-streaming-logs.s3.amazonaws.com", "sdlog-") // Logging
);
System.out.println("Updated Streaming Distribution Config: "
+ updatedStreamingDistributionConfig);
// Disable a streaming distribution, e.g. so that it may be deleted.
// The CloudFront service may take some time to disable and deploy the distribution.
StreamingDistributionConfig disabledStreamingDistributionConfig =
cloudFrontService.updateStreamingDistributionConfig(
testStreamingDistributionId,
null, // origin -- null for no changes
new String[] {}, "Deleting distribution",
false, // Distribution enabled?