mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
feat(redshift-serverless): add custom domain association actions (#5766)
* feat(redshift-serverless): add custom domain association actions Add CreateCustomDomainAssociation, GetCustomDomainAssociation, ListCustomDomainAssociations, UpdateCustomDomainAssociation and DeleteCustomDomainAssociation. An association is recorded and echoed; Floci serves no traffic on the domain and reads no ACM certificate. It is tied to the workgroup by the workgroup's generated id, so a workgroup recreated under the same name does not inherit it. The domain name and certificate ARN patterns, lengths and the required members come from the AWS model through RedshiftServerlessRequestShapes, so the service carries no validation of its own. * fix(redshift-serverless): address review findings for custom domains - Expose custom domain name and certificate ARN in workgroup responses. - Ensure custom domain names are unique across workgroups in a region. - Remove ambiguous Pagination.paginate overload in favor of paginateNamespaced. - Add domain name and certificate ARN validation patterns and length checks. - Enforce validation for required parameters in custom domain operations. * fix(redshift-serverless): enforce single custom domain per workgroup and populate certificate expiry * fix(redshift-serverless): read certificate expiry dynamically and share custom domain serialization
This commit is contained in:
1 parent
92be67d2df
commit
7cab804d22
11 files changed
+626
-19
No files matched your search
+26
@@ -347,6 +347,32 @@ class RedshiftServerlessTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void customDomainAssociationUsesAwsSdk() {
|
||||
assumeFalse(TestFixtures.isRealAws(), "Creates resources and asserts emulator-local behavior");
|
||||
|
||||
try (RedshiftServerlessClient client = TestFixtures.redshiftServerlessClient()) {
|
||||
String namespaceName = "floci-compat-domain-ns";
|
||||
String workgroupName = "floci-compat-domain-wg";
|
||||
String certificate = "arn:aws:acm:us-east-1:000000000000:certificate/11111111-2222-3333-4444-555555555555";
|
||||
try {
|
||||
client.createNamespace(request -> request.namespaceName(namespaceName).adminUsername("admin")
|
||||
.adminUserPassword("Secret123!"));
|
||||
client.createWorkgroup(request -> request.workgroupName(workgroupName).namespaceName(namespaceName));
|
||||
|
||||
client.createCustomDomainAssociation(request -> request.workgroupName(workgroupName)
|
||||
.customDomainName("db.example.com").customDomainCertificateArn(certificate));
|
||||
assertThat(client.listCustomDomainAssociations(request -> request.customDomainName("db.example.com"))
|
||||
.associations()).hasSize(1);
|
||||
client.deleteCustomDomainAssociation(request -> request.workgroupName(workgroupName)
|
||||
.customDomainName("db.example.com"));
|
||||
} finally {
|
||||
deleteWorkgroupBestEffort(client, workgroupName);
|
||||
deleteBestEffort(client, namespaceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void deleteSnapshotBestEffort(RedshiftServerlessClient client, String snapshotName) {
|
||||
try {
|
||||
client.deleteSnapshot(request -> request.snapshotName(snapshotName));
|
||||
|
||||
Reference in new issue
Block a user