Search in sources :

Example 1 with AwsTracingRequestHandler

use of com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler in project cloudbreak by hortonworks.

the class AwsClient method createS3Client.

public AmazonS3Client createS3Client(AwsCredentialView awsCredential) {
    String regionName = awsDefaultZoneProvider.getDefaultZone(awsCredential);
    AmazonS3 client = proxy(AmazonS3ClientBuilder.standard().withRequestHandlers(new AwsTracingRequestHandler(tracer)).withCredentials(getCredentialProvider(awsCredential)).withRegion(regionName).withForceGlobalBucketAccessEnabled(Boolean.TRUE).build(), awsCredential, regionName);
    return new AmazonS3Client(client);
}
Also used : AmazonS3(com.amazonaws.services.s3.AmazonS3) AwsTracingRequestHandler(com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler) AmazonS3Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonS3Client)

Example 2 with AwsTracingRequestHandler

use of com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler in project cloudbreak by hortonworks.

the class AwsClient method createAmazonIdentityManagement.

public AmazonIdentityManagementClient createAmazonIdentityManagement(AwsCredentialView awsCredential) {
    String region = awsDefaultZoneProvider.getDefaultZone(awsCredential);
    AmazonIdentityManagement client = proxy(AmazonIdentityManagementClientBuilder.standard().withRequestHandlers(new AwsTracingRequestHandler(tracer)).withRegion(region).withClientConfiguration(getDefaultClientConfiguration()).withCredentials(getCredentialProvider(awsCredential)).build(), awsCredential, region);
    return new AmazonIdentityManagementClient(client);
}
Also used : AmazonIdentityManagementClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonIdentityManagementClient) AwsTracingRequestHandler(com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler) AmazonIdentityManagement(com.amazonaws.services.identitymanagement.AmazonIdentityManagement)

Example 3 with AwsTracingRequestHandler

use of com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler in project cloudbreak by hortonworks.

the class AwsClient method createCdpSecurityTokenServiceClient.

public AmazonSecurityTokenServiceClient createCdpSecurityTokenServiceClient(AwsCredentialView awsCredential) {
    String region = awsDefaultZoneProvider.getDefaultZone(awsCredential);
    AWSSecurityTokenService client = proxy(com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.builder().withCredentials(DefaultAWSCredentialsProviderChain.getInstance()).withClientConfiguration(getDefaultClientConfiguration()).withRequestHandlers(new AwsTracingRequestHandler(tracer)).withRegion(region).build(), awsCredential, region);
    return new AmazonSecurityTokenServiceClient(client);
}
Also used : AwsTracingRequestHandler(com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler) AWSSecurityTokenService(com.amazonaws.services.securitytoken.AWSSecurityTokenService) AmazonSecurityTokenServiceClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonSecurityTokenServiceClient)

Aggregations

AwsTracingRequestHandler (com.sequenceiq.cloudbreak.cloud.aws.common.tracing.AwsTracingRequestHandler)3 AmazonIdentityManagement (com.amazonaws.services.identitymanagement.AmazonIdentityManagement)1 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 AWSSecurityTokenService (com.amazonaws.services.securitytoken.AWSSecurityTokenService)1 AmazonIdentityManagementClient (com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonIdentityManagementClient)1 AmazonS3Client (com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonS3Client)1 AmazonSecurityTokenServiceClient (com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonSecurityTokenServiceClient)1