List of usage examples for com.amazonaws.services.rds AmazonRDSClient AmazonRDSClient
AmazonRDSClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled)
From source file:com.cloudera.director.aws.AWSProvider.java
License:Apache License
@Override protected ConfigurationValidator getResourceProviderConfigurationValidator( ResourceProviderMetadata resourceProviderMetadata) { ClientConfiguration clientConfiguration = getClientConfiguration(); ConfigurationValidator providerSpecificValidator; if (resourceProviderMetadata.getId().equals(EC2Provider.METADATA.getId())) { AmazonEC2Client client = new AmazonEC2Client(credentialsProvider, clientConfiguration); AmazonIdentityManagementClient identityManagementClient = new AmazonIdentityManagementClient( credentialsProvider, clientConfiguration); AWSKMSClient kmsClient = new AWSKMSClient(credentialsProvider, clientConfiguration); providerSpecificValidator = new EC2ProviderConfigurationValidator(client, identityManagementClient, kmsClient);//w ww .j a v a 2 s. co m } else if (resourceProviderMetadata.getId().equals(RDSProvider.METADATA.getId())) { AmazonRDSClient client = new AmazonRDSClient(credentialsProvider, clientConfiguration); providerSpecificValidator = new RDSProviderConfigurationValidator(client, rdsEndpoints); } else { throw new IllegalArgumentException("No such provider: " + resourceProviderMetadata.getId()); } return new CompositeConfigurationValidator(METADATA.getProviderConfigurationValidator(), providerSpecificValidator); }
From source file:com.cloudera.director.aws.AWSProvider.java
License:Apache License
/** * Creates an RDS provider with the specified configuration. * * @param target the configuration/* w ww.jav a2 s.co m*/ * @return the RDS provider */ protected RDSProvider createRDSProvider(Configured target) { ClientConfiguration clientConfiguration = getClientConfiguration(); return new RDSProvider(target, rdsEndpoints, rdsEncryptionInstanceClasses, new AmazonRDSClient(credentialsProvider, clientConfiguration), new AmazonIdentityManagementClient(credentialsProvider, clientConfiguration), getLocalizationContext()); }