Java 类com.amazonaws.services.codedeploy.AmazonCodeDeployClient 实例源码

项目:aws-codedeploy-plugin    文件:AWSClients.java   
public AWSClients(String region, AWSCredentials credentials, String proxyHost, int proxyPort) {
    this.region = region;
    this.proxyHost = proxyHost;
    this.proxyPort = proxyPort;

    //setup proxy connection:
    ClientConfiguration clientCfg = new ClientConfiguration();
    if (proxyHost != null && proxyPort > 0 ) {
        clientCfg.setProxyHost(proxyHost);
        clientCfg.setProxyPort(proxyPort);
    }

    this.s3 = credentials != null ? new AmazonS3Client(credentials, clientCfg) : new AmazonS3Client(clientCfg);
    this.codedeploy = credentials != null ? new AmazonCodeDeployClient(credentials, clientCfg) : new AmazonCodeDeployClient(clientCfg);
    codedeploy.setRegion(Region.getRegion(Regions.fromName(this.region)));
    s3.setRegion(Region.getRegion(Regions.fromName(this.region)));
}
项目:aws-codedeploy-sample-tomcat    文件:MvcConfiguration.java   
@Bean
public AmazonCodeDeploy codeDeploy() {
    final AmazonCodeDeploy client = new AmazonCodeDeployClient();
    client.setRegion(region);
    return client;
}