Java 类com.amazonaws.services.elastictranscoder.AmazonElasticTranscoderClient 实例源码

项目:aws-utilization-monitor    文件:AwsScan.java   
/**
 * Collect data for ElasticTranscoder.
 *
 * @param stats
 *            current statistics object.
 * @param account
 *            currently used credentials object.
 * @param region
 *            currently used aws region.
 */
public static void scanElasticTranscoder(AwsStats stats, AwsAccount account, Regions region) {
    if (region == Regions.EU_CENTRAL_1)
        return;

    LOG.debug("Scan for ElasticTranscoder in region " + region.getName() + " in account " + account.getAccountId());

    try {
        AmazonElasticTranscoder elasticTranscoder = new AmazonElasticTranscoderClient(account.getCredentials());
        elasticTranscoder.setRegion(Region.getRegion(region));

        List<Pipeline> list = elasticTranscoder.listPipelines().getPipelines();

        int totalItems = list.size();
        for (Pipeline pipeline : list) {
            AwsResource res = new AwsResource(pipeline.getName(), account.getAccountId(), AwsResourceType.ElasticTranscoder, region);
            res.addInfo(AwsTag.Arn, pipeline.getArn());
            stats.add(res);
        }

        LOG.info(totalItems + " Elastic Transcoder pipelines in region " + region.getName() + " in account " + account.getAccountId());
    } catch (AmazonServiceException ase) {
        LOG.error("Exception of ElasticTranscoder: " + ase.getMessage());
    }
}
项目:openbd-core    文件:AmazonBase.java   
/**
 * Returns back the necessary AmazonElasticTranscoder class for interacting with Elastic Transcoder
 * @param amazonKey
 * @return
 * @throws cfmRunTimeException
 */
public AmazonElasticTranscoder getAmazonElasticTranscoder( AmazonKey amazonKey ) throws cfmRunTimeException{
    BasicAWSCredentials awsCreds = new BasicAWSCredentials(amazonKey.getKey(), amazonKey.getSecret());
    AmazonElasticTranscoder et = new AmazonElasticTranscoderClient(awsCreds);
    et.setRegion( amazonKey.getAmazonRegion().toAWSRegion() );
    return et;
}
项目:transcoder    文件:ApplicationConfig.java   
@Bean( destroyMethod = "shutdown" )
AmazonElasticTranscoder amazonElasticTranscoderClient()
{
    return this.awsRegion().createClient( AmazonElasticTranscoderClient.class,
                                          this.awsCredentials(),
                                          new ClientConfiguration() );
}
项目:amediamanager    文件:ServerConfig.java   
@Bean
@Scope(WebApplicationContext.SCOPE_APPLICATION)
public AmazonElasticTranscoder transcodeClient(final AWSCredentialsProvider creds,
                                               final Region region) {
    return region.createClient(AmazonElasticTranscoderClient.class, creds, null);
}