Search in sources :

Example 1 with ServiceEndpoint

use of com.amazonaws.services.cloudsearchv2.model.ServiceEndpoint in project Synapse-Stack-Builder by Sage-Bionetworks.

the class TestHelper method createTestResources.

/**
 * Create GeneratedResources that can be used for a test.
 *
 * @param config
 * @return
 */
public static GeneratedResources createTestResources(InputConfiguration config) {
    GeneratedResources resources = new GeneratedResources();
    resources.setIdGeneratorDatabase(new DBInstance().withDBInstanceIdentifier(config.getIdGeneratorDatabaseIdentifier()).withEndpoint(new Endpoint().withAddress("id-gen-db.someplace.com")));
    resources.setStackInstancesDatabase(new DBInstance().withDBInstanceIdentifier(config.getStackInstanceDatabaseIdentifier()).withEndpoint(new Endpoint().withAddress("stack-instance-db.someplace.com")));
    resources.setSearchDomain(new DomainStatus().withSearchService(new ServiceEndpoint().withEndpoint("search-service.someplace.com")));
    resources.getSearchDomain().setDocService(new ServiceEndpoint().withEndpoint("doc-service.someplace.com"));
    resources.setSslCertificate(StackEnvironmentType.REPO, new ServerCertificateMetadata().withArn("ssl:arn:123"));
    resources.setSslCertificate(StackEnvironmentType.WORKERS, new ServerCertificateMetadata().withArn("ssl:arn:123"));
    resources.setSslCertificate(StackEnvironmentType.PORTAL, new ServerCertificateMetadata().withArn("ssl:arn:456"));
    resources.setACMCertificateArn(StackEnvironmentType.PORTAL, "arn:aws:acm:us-east1:123456789012:certificate/12345678-1234-1234-1234-123456789012");
    resources.setACMCertificateArn(StackEnvironmentType.REPO, "arn:aws:acm:us-east1:123456789012:certificate/12345678-1234-1234-1234-223456789012");
    resources.setACMCertificateArn(StackEnvironmentType.WORKERS, "arn:aws:acm:us-east1:123456789012:certificate/12345678-1234-1234-1234-323456789012");
    resources.setPortalApplicationVersion(new ApplicationVersionDescription().withVersionLabel(config.getVersionLabel(PREFIX_PORTAL)));
    resources.setRepoApplicationVersion(new ApplicationVersionDescription().withVersionLabel(config.getVersionLabel(PREFIX_REPO)));
    resources.setWorkersApplicationVersion(new ApplicationVersionDescription().withVersionLabel(config.getVersionLabel(PREFIX_WORKERS)));
    resources.setStackKeyPair(new KeyPairInfo().withKeyName(config.getStackKeyPairName()));
    // Add tables database instances
    List<DBInstance> tablesInstances = new LinkedList<DBInstance>();
    tablesInstances.add(new DBInstance().withEndpoint(new Endpoint().withAddress("tables.endpoint.one")));
    tablesInstances.add(new DBInstance().withEndpoint(new Endpoint().withAddress("tables.endpoint.two")));
    resources.setStackInstanceTablesDatabases(tablesInstances);
    return resources;
}
Also used : ServerCertificateMetadata(com.amazonaws.services.identitymanagement.model.ServerCertificateMetadata) ApplicationVersionDescription(com.amazonaws.services.elasticbeanstalk.model.ApplicationVersionDescription) DBInstance(com.amazonaws.services.rds.model.DBInstance) ServiceEndpoint(com.amazonaws.services.cloudsearchv2.model.ServiceEndpoint) Endpoint(com.amazonaws.services.rds.model.Endpoint) KeyPairInfo(com.amazonaws.services.ec2.model.KeyPairInfo) DomainStatus(com.amazonaws.services.cloudsearchv2.model.DomainStatus) ServiceEndpoint(com.amazonaws.services.cloudsearchv2.model.ServiceEndpoint) LinkedList(java.util.LinkedList)

Aggregations

DomainStatus (com.amazonaws.services.cloudsearchv2.model.DomainStatus)1 ServiceEndpoint (com.amazonaws.services.cloudsearchv2.model.ServiceEndpoint)1 KeyPairInfo (com.amazonaws.services.ec2.model.KeyPairInfo)1 ApplicationVersionDescription (com.amazonaws.services.elasticbeanstalk.model.ApplicationVersionDescription)1 ServerCertificateMetadata (com.amazonaws.services.identitymanagement.model.ServerCertificateMetadata)1 DBInstance (com.amazonaws.services.rds.model.DBInstance)1 Endpoint (com.amazonaws.services.rds.model.Endpoint)1 LinkedList (java.util.LinkedList)1