mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
feat(redshift): implement snapshot copy grant lifecycle (#3628)
* feat(redshift): implement snapshot copy grant lifecycle Terraform's aws_redshift_snapshot_copy_grant needs the full CRUD, and all three actions returned InvalidAction. Add CreateSnapshotCopyGrant, DescribeSnapshotCopyGrants and DeleteSnapshotCopyGrant to the Query handler, backed by a new storage map on RedshiftService. The grant name is the key: a duplicate create raises SnapshotCopyGrantAlreadyExistsFault, and describe-by-name or delete of a missing grant raises SnapshotCopyGrantNotFoundFault. Describe without a name returns every grant. KmsKeyId is optional and defaults to the account's AWS-managed Redshift key alias ARN, mirroring how Ec2EbsEncryptionService stands in for a default key. Tags ride along on create, since the CLI sends them inline as Tags.Tag.N.Key/.Value on this action rather than via CreateTags, and snapshotcopygrant ARNs now resolve in the tagging operations alongside the other Redshift resource types. * test(redshift): cover snapshot copy grants through the real SDK * fix(redshift): paginate DescribeSnapshotCopyGrants The action returned every grant in one page and ignored MaxRecords and Marker, so a client with more grants than fit in a page had no way to walk them. Page through the shared Pagination helper, which sorts by the grant name and encodes the last returned name as an opaque base64 cursor, so ordering is stable and a marker stays resumable when grants are created or deleted between pages. Marker is emitted only while further pages remain, which is what tells a paginating client to stop. MaxRecords follows the Redshift model: default 100, and a value outside 20 to 100 is rejected with InvalidParameterValue rather than clamped. The model documents SnapshotCopyGrantName and Marker as mutually exclusive but declares no error for sending both, so this filters by name and then paginates instead of rejecting the pair. A name matches at most one grant, which fits in any page. * fix(redshift): enforce the SnapshotCopyGrantName contract AWS validates SnapshotCopyGrantName as 1-63 characters, first a lowercase letter, then lowercase letters, digits or single hyphens with no trailing or doubled hyphen. Create accepted anything non-blank, so names Redshift rejects (1grant, Grant, grant--copy, grant-, 64 characters) persisted locally and diverged from AWS. Validate in RedshiftService before persistence, matching the existing snapshot identifier check, and answer InvalidParameterValue as the rest of the handler does. * fix(redshift): return 400 for SnapshotCopyGrantNotFoundFault on Describe and Delete AWS documents SnapshotCopyGrantNotFoundFault as HTTP 400 in the error tables for both DescribeSnapshotCopyGrants and DeleteSnapshotCopyGrant; we returned 404. Two existing wire-level assertions in RedshiftOperationsTest pinned the wrong status, so they move with the code, and the unit tests now assert the status alongside the error code. The third throw site, in the tagging helper, deliberately stays 404: the status belongs to the action rather than the fault code, and that path is reached only from CreateTags/DeleteTags/DescribeTags, whose documented missing-resource error is ResourceNotFoundFault at 404. A regression pins that, and a comment says why the two differ. Refs: https://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeSnapshotCopyGrants.html https://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteSnapshotCopyGrant.html https://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateTags.html * fix(redshift): serialize grant create/delete, and use ResourceNotFoundFault on the tag path Two findings from the latest review round. createSnapshotCopyGrant checked the name was free and then wrote, with nothing between the two steps, so two concurrent creates of one name could both succeed and the second would overwrite the first. create and delete are now synchronized, as createCluster and modifyCluster already are. The new wire-level test holds two threads on a latch and releases them into the same name: it fails on every run without the keyword (3/3 locally) and passes with it, so it pins the lock rather than describing it. The tagging path threw SnapshotCopyGrantNotFoundFault with HTTP 404. Both halves of that pairing cannot be right at once: botocore's Redshift model gives that shape httpStatusCode 400, and an error shape's status is a property of the shape, not of the calling action. But 404 is the correct status here, because CreateTags/DeleteTags/DescribeTags do not list that fault at all -- they document ResourceNotFoundFault, modelled at 404, for any missing resource. So the status stays and the code changes. That also explains why the three sibling cases in the same switch are already consistent: ClusterNotFound, ClusterSnapshotNotFound and ClusterParameterGroupNotFound are each modelled at 404 themselves. Describe and Delete still return SnapshotCopyGrantNotFoundFault at 400, which is what those two actions document. Docs gain a short section on the grant surface: the alias-ARN KmsKeyId default, the unvalidated tag limits, and why a missing grant reports two different faults depending on which action you reach it through. * style(test): name the new snapshot copy grant tests without the testX prefix AGENTS.md: "Name test methods either as a camelCase sentence or as method_scenario_expectation. Both are established. testX names are common in older tests and are not the pattern to copy." The 31 tests this PR adds to src/test all used testX because the three Redshift files they landed in are unusually full of it -- 7/7, 30/50 and 69/104 -- but that is the local exception, not the repo convention, and the rule is explicit about not copying it. Renames only; no test body changes. The two new tests in compatibility-tests/sdk-test-java keep testX: that module has the opposite idiom and AGENTS.md says to follow the module you are in, and all five methods in that file, three of them pre-existing, are named that way.
This commit is contained in:
1 parent
2e038b5cfb
commit
2af7ed71a7
9 files changed
+1114
-3
No files matched your search
@@ -608,6 +608,7 @@ public class AwsQueryController {
|
||||
"CreateClusterParameterGroup", "DescribeClusterParameterGroups", "DescribeClusterParameters", "DeleteClusterParameterGroup",
|
||||
"ModifyClusterParameterGroup",
|
||||
"CreateClusterSubnetGroup", "DescribeClusterSubnetGroups", "ModifyClusterSubnetGroup", "DeleteClusterSubnetGroup",
|
||||
"CreateSnapshotCopyGrant", "DescribeSnapshotCopyGrants", "DeleteSnapshotCopyGrant",
|
||||
"CreateTags", "DeleteTags", "DescribeTags",
|
||||
"GetClusterCredentials", "GetClusterCredentialsWithIAM"
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.github.hectorvent.floci.services.redshift;
|
||||
|
||||
import io.github.hectorvent.floci.config.EmulatorConfig;
|
||||
import io.github.hectorvent.floci.core.common.AwsException;
|
||||
import io.github.hectorvent.floci.core.common.PaginatedResult;
|
||||
import io.github.hectorvent.floci.core.common.RegionResolver;
|
||||
import io.github.hectorvent.floci.core.common.XmlBuilder;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Cluster;
|
||||
@@ -10,6 +11,7 @@ import io.github.hectorvent.floci.services.redshift.model.ClusterSubnetGroup;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Integration;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Parameter;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Snapshot;
|
||||
import io.github.hectorvent.floci.services.redshift.model.SnapshotCopyGrant;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
@@ -490,6 +492,67 @@ public class RedshiftQueryHandler {
|
||||
.build();
|
||||
return Response.ok(xml).type(MediaType.APPLICATION_XML).build();
|
||||
}
|
||||
case "CreateSnapshotCopyGrant" -> {
|
||||
String name = params.getFirst("SnapshotCopyGrantName");
|
||||
if (name == null || name.isBlank()) {
|
||||
throw new AwsException("InvalidParameterValue", "SnapshotCopyGrantName is required", 400);
|
||||
}
|
||||
String kmsKeyId = params.getFirst("KmsKeyId");
|
||||
SnapshotCopyGrant grant = service.createSnapshotCopyGrant(name, kmsKeyId, parseTags(params));
|
||||
String xml = new XmlBuilder()
|
||||
.start("CreateSnapshotCopyGrantResponse")
|
||||
.start("CreateSnapshotCopyGrantResult")
|
||||
.raw(buildSnapshotCopyGrantXml(grant))
|
||||
.end("CreateSnapshotCopyGrantResult")
|
||||
.start("ResponseMetadata")
|
||||
.elem("RequestId", "test-req-id")
|
||||
.end("ResponseMetadata")
|
||||
.end("CreateSnapshotCopyGrantResponse")
|
||||
.build();
|
||||
return Response.ok(xml).type(MediaType.APPLICATION_XML).build();
|
||||
}
|
||||
case "DescribeSnapshotCopyGrants" -> {
|
||||
String name = params.getFirst("SnapshotCopyGrantName");
|
||||
Integer maxRecords = parseOptionalInteger(params, "MaxRecords");
|
||||
String marker = params.getFirst("Marker");
|
||||
PaginatedResult<SnapshotCopyGrant> page = service.describeSnapshotCopyGrants(name, maxRecords, marker);
|
||||
XmlBuilder xmlBuilder = new XmlBuilder()
|
||||
.start("DescribeSnapshotCopyGrantsResponse")
|
||||
.start("DescribeSnapshotCopyGrantsResult");
|
||||
// AWS returns Marker only while further pages remain, and a paginating client
|
||||
// stops when it is absent.
|
||||
if (page.nextToken() != null) {
|
||||
xmlBuilder.elem("Marker", page.nextToken());
|
||||
}
|
||||
xmlBuilder.start("SnapshotCopyGrants");
|
||||
for (SnapshotCopyGrant grant : page.items()) {
|
||||
xmlBuilder.raw(buildSnapshotCopyGrantXml(grant));
|
||||
}
|
||||
String xml = xmlBuilder
|
||||
.end("SnapshotCopyGrants")
|
||||
.end("DescribeSnapshotCopyGrantsResult")
|
||||
.start("ResponseMetadata")
|
||||
.elem("RequestId", "test-req-id")
|
||||
.end("ResponseMetadata")
|
||||
.end("DescribeSnapshotCopyGrantsResponse")
|
||||
.build();
|
||||
return Response.ok(xml).type(MediaType.APPLICATION_XML).build();
|
||||
}
|
||||
case "DeleteSnapshotCopyGrant" -> {
|
||||
String name = params.getFirst("SnapshotCopyGrantName");
|
||||
if (name == null || name.isBlank()) {
|
||||
throw new AwsException("InvalidParameterValue", "SnapshotCopyGrantName is required", 400);
|
||||
}
|
||||
service.deleteSnapshotCopyGrant(name);
|
||||
String xml = new XmlBuilder()
|
||||
.start("DeleteSnapshotCopyGrantResponse")
|
||||
.start("ResponseMetadata")
|
||||
.elem("RequestId", "test-req-id")
|
||||
.end("ResponseMetadata")
|
||||
.end("DeleteSnapshotCopyGrantResponse")
|
||||
.build();
|
||||
return Response.ok(xml).type(MediaType.APPLICATION_XML).build();
|
||||
}
|
||||
case "ModifyCluster" -> {
|
||||
String clusterIdentifier = params.getFirst("ClusterIdentifier");
|
||||
if (clusterIdentifier == null || clusterIdentifier.isBlank()) {
|
||||
@@ -809,6 +872,26 @@ public class RedshiftQueryHandler {
|
||||
return builder.end("Subnets").end("ClusterSubnetGroup").build();
|
||||
}
|
||||
|
||||
private String buildSnapshotCopyGrantXml(SnapshotCopyGrant grant) {
|
||||
XmlBuilder builder = new XmlBuilder()
|
||||
.start("SnapshotCopyGrant")
|
||||
.elem("SnapshotCopyGrantName", grant.getSnapshotCopyGrantName())
|
||||
.elem("KmsKeyId", grant.getKmsKeyId());
|
||||
|
||||
if (grant.getTags() != null && !grant.getTags().isEmpty()) {
|
||||
builder.start("Tags");
|
||||
for (Map.Entry<String, String> tag : grant.getTags().entrySet()) {
|
||||
builder.start("Tag")
|
||||
.elem("Key", tag.getKey())
|
||||
.elem("Value", tag.getValue())
|
||||
.end("Tag");
|
||||
}
|
||||
builder.end("Tags");
|
||||
}
|
||||
|
||||
return builder.end("SnapshotCopyGrant").build();
|
||||
}
|
||||
|
||||
private String buildParameterXml(Parameter param) {
|
||||
XmlBuilder builder = new XmlBuilder()
|
||||
.start("Parameter")
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.github.hectorvent.floci.config.EmulatorConfig;
|
||||
import io.github.hectorvent.floci.core.common.AwsArnUtils;
|
||||
import io.github.hectorvent.floci.core.common.AwsException;
|
||||
import io.github.hectorvent.floci.core.common.PaginatedResult;
|
||||
import io.github.hectorvent.floci.core.common.Pagination;
|
||||
import io.github.hectorvent.floci.core.common.RegionResolver;
|
||||
import io.github.hectorvent.floci.core.common.docker.DockerHostResolver;
|
||||
import io.github.hectorvent.floci.core.storage.AccountAwareStorageBackend;
|
||||
@@ -23,6 +25,7 @@ import io.github.hectorvent.floci.services.redshift.model.ClusterSubnetGroup;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Endpoint;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Parameter;
|
||||
import io.github.hectorvent.floci.services.redshift.model.Snapshot;
|
||||
import io.github.hectorvent.floci.services.redshift.model.SnapshotCopyGrant;
|
||||
import io.github.hectorvent.floci.services.redshift.proxy.RedshiftProxyManager;
|
||||
import io.github.hectorvent.floci.services.secretsmanager.RandomPasswordGenerator;
|
||||
import io.github.hectorvent.floci.services.secretsmanager.SecretsManagerService;
|
||||
@@ -68,6 +71,7 @@ public class RedshiftService {
|
||||
private static final Pattern INTEGRATION_NAME = Pattern.compile(INTEGRATION_NAME_PATTERN);
|
||||
|
||||
private final AccountAwareStorageBackend<Integration> integrations;
|
||||
private final AccountAwareStorageBackend<SnapshotCopyGrant> snapshotCopyGrants;
|
||||
private final RedshiftContainerManager containerManager;
|
||||
private final EmulatorConfig config;
|
||||
private final RegionResolver regionResolver;
|
||||
@@ -92,6 +96,7 @@ public class RedshiftService {
|
||||
this.parameterGroups = storageFactory.create("redshift", "redshift-parameter-groups.json", new TypeReference<Map<String, ClusterParameterGroup>>() {});
|
||||
this.subnetGroups = storageFactory.create("redshift", "redshift-subnet-groups.json", new TypeReference<Map<String, ClusterSubnetGroup>>() {});
|
||||
this.integrations = storageFactory.create("redshift", "redshift-integrations.json", new TypeReference<Map<String, Integration>>() {});
|
||||
this.snapshotCopyGrants = storageFactory.create("redshift", "redshift-snapshot-copy-grants.json", new TypeReference<Map<String, SnapshotCopyGrant>>() {});
|
||||
this.containerManager = containerManager;
|
||||
this.config = config;
|
||||
this.regionResolver = regionResolver;
|
||||
@@ -1139,6 +1144,95 @@ public class RedshiftService {
|
||||
return group;
|
||||
}
|
||||
|
||||
// ── Snapshot Copy Grant Operations ───────────────────────────────────────
|
||||
|
||||
/**
|
||||
* AWS-managed Redshift key an account gets when CreateSnapshotCopyGrant omits KmsKeyId.
|
||||
* Floci has no per-account default key, so the alias ARN stands in for it: the value only
|
||||
* has to round-trip through Describe, which is what Terraform reads back.
|
||||
*/
|
||||
private String defaultSnapshotCopyGrantKey() {
|
||||
return regionResolver.buildArn("kms", regionResolver.getRegion(), "alias/aws/redshift");
|
||||
}
|
||||
|
||||
/**
|
||||
* AWS constrains a snapshot copy grant name to 1-63 characters, first a lowercase letter,
|
||||
* then lowercase letters, digits or single hyphens (no trailing or doubled hyphen). Names
|
||||
* Redshift rejects must not create here either, or Terraform sees a grant that cannot
|
||||
* exist upstream.
|
||||
*/
|
||||
private static void validateSnapshotCopyGrantName(String name) {
|
||||
if (name == null || !name.matches("[a-z][a-z0-9-]{0,62}")
|
||||
|| name.contains("--") || name.endsWith("-")) {
|
||||
throw new AwsException("InvalidParameterValue",
|
||||
"SnapshotCopyGrantName must be 1-63 characters, start with a lowercase letter, "
|
||||
+ "and contain only lowercase letters, digits and non-consecutive hyphens", 400);
|
||||
}
|
||||
}
|
||||
|
||||
// synchronized like createCluster: the free-name check and the write must not interleave,
|
||||
// or two concurrent creates of the same name both succeed and the second overwrites the first.
|
||||
public synchronized SnapshotCopyGrant createSnapshotCopyGrant(String name, String kmsKeyId, Map<String, String> tags) {
|
||||
validateSnapshotCopyGrantName(name);
|
||||
if (snapshotCopyGrants.get(name).isPresent()) {
|
||||
throw new AwsException("SnapshotCopyGrantAlreadyExistsFault",
|
||||
"Snapshot copy grant " + name + " already exists", 400);
|
||||
}
|
||||
String effectiveKey = (kmsKeyId != null && !kmsKeyId.isBlank()) ? kmsKeyId : defaultSnapshotCopyGrantKey();
|
||||
SnapshotCopyGrant grant = new SnapshotCopyGrant(name, effectiveKey);
|
||||
if (tags != null && !tags.isEmpty()) {
|
||||
grant.setTags(new LinkedHashMap<>(tags));
|
||||
}
|
||||
snapshotCopyGrants.put(name, grant);
|
||||
snapshotCopyGrants.flush();
|
||||
return grant;
|
||||
}
|
||||
|
||||
/** Default and maximum page size AWS documents for DescribeSnapshotCopyGrants. */
|
||||
private static final int SNAPSHOT_COPY_GRANT_PAGE_DEFAULT = 100;
|
||||
private static final int SNAPSHOT_COPY_GRANT_PAGE_MAX = 100;
|
||||
private static final int SNAPSHOT_COPY_GRANT_PAGE_MIN = 20;
|
||||
|
||||
/**
|
||||
* Pages grants by name, which is their primary key, so the order is stable across calls
|
||||
* and a marker stays resumable when grants are created or deleted between pages.
|
||||
*
|
||||
* <p>AWS documents SnapshotCopyGrantName and Marker as mutually exclusive, but models no
|
||||
* error for sending both, so this filters first and then paginates rather than rejecting
|
||||
* the combination: a name matches at most one grant, which fits in any page.
|
||||
*/
|
||||
public PaginatedResult<SnapshotCopyGrant> describeSnapshotCopyGrants(String name, Integer maxRecords, String marker) {
|
||||
if (maxRecords != null
|
||||
&& (maxRecords < SNAPSHOT_COPY_GRANT_PAGE_MIN || maxRecords > SNAPSHOT_COPY_GRANT_PAGE_MAX)) {
|
||||
throw new AwsException("InvalidParameterValue",
|
||||
"MaxRecords must be between " + SNAPSHOT_COPY_GRANT_PAGE_MIN
|
||||
+ " and " + SNAPSHOT_COPY_GRANT_PAGE_MAX + ".", 400);
|
||||
}
|
||||
|
||||
List<SnapshotCopyGrant> matching;
|
||||
if (name != null && !name.isBlank()) {
|
||||
SnapshotCopyGrant grant = snapshotCopyGrants.get(name)
|
||||
.orElseThrow(() -> new AwsException("SnapshotCopyGrantNotFoundFault",
|
||||
"Snapshot copy grant " + name + " not found", 400));
|
||||
matching = List.of(grant);
|
||||
} else {
|
||||
matching = snapshotCopyGrants.scan(k -> true);
|
||||
}
|
||||
|
||||
return Pagination.paginate(matching, SnapshotCopyGrant::getSnapshotCopyGrantName,
|
||||
maxRecords, marker, SNAPSHOT_COPY_GRANT_PAGE_DEFAULT, SNAPSHOT_COPY_GRANT_PAGE_MAX,
|
||||
"InvalidParameterValue");
|
||||
}
|
||||
|
||||
public synchronized SnapshotCopyGrant deleteSnapshotCopyGrant(String name) {
|
||||
SnapshotCopyGrant grant = snapshotCopyGrants.get(name)
|
||||
.orElseThrow(() -> new AwsException("SnapshotCopyGrantNotFoundFault",
|
||||
"Snapshot copy grant " + name + " not found", 400));
|
||||
snapshotCopyGrants.delete(name);
|
||||
snapshotCopyGrants.flush();
|
||||
return grant;
|
||||
}
|
||||
|
||||
// ── Tagging Operations ───────────────────────────────────────────────────
|
||||
|
||||
/** A resolved tag target: its current tags plus a sink that persists an updated map. */
|
||||
@@ -1195,6 +1289,12 @@ public class RedshiftService {
|
||||
"subnetgroup", g.getTags(), tagKeysFilter);
|
||||
}
|
||||
}
|
||||
if (resourceType == null || "snapshotcopygrant".equalsIgnoreCase(resourceType)) {
|
||||
for (SnapshotCopyGrant g : snapshotCopyGrants.scan(k -> true)) {
|
||||
addTaggedResources(result, snapshotCopyGrantArn(g.getSnapshotCopyGrantName()),
|
||||
"snapshotcopygrant", g.getTags(), tagKeysFilter);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1232,12 +1332,17 @@ public class RedshiftService {
|
||||
return regionResolver.buildArn("redshift", regionResolver.getRegion(), "subnetgroup:" + name);
|
||||
}
|
||||
|
||||
private String snapshotCopyGrantArn(String name) {
|
||||
return regionResolver.buildArn("redshift", regionResolver.getRegion(), "snapshotcopygrant:" + name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a tagging ResourceName to its backing resource.
|
||||
*
|
||||
* Redshift ARNs have the shape {@code arn:aws:redshift:<region>:<account>:<type>:<id>},
|
||||
* where {@code <type>} is one of {@code cluster}, {@code snapshot} (id shape
|
||||
* {@code <clusterId>/<snapshotId>}), or {@code parametergroup}. Unlike RDS's tag
|
||||
* {@code <clusterId>/<snapshotId>}), {@code parametergroup}, {@code subnetgroup} or
|
||||
* {@code snapshotcopygrant}. Unlike RDS's tag
|
||||
* resolution, there is no bare-name fallback — Redshift tagging is new, so there is no
|
||||
* existing caller to stay backward compatible with.
|
||||
*/
|
||||
@@ -1303,6 +1408,23 @@ public class RedshiftService {
|
||||
subnetGroups.flush();
|
||||
});
|
||||
}
|
||||
case "snapshotcopygrant" -> {
|
||||
// ResourceNotFoundFault, not SnapshotCopyGrantNotFoundFault: this path is only
|
||||
// reached from CreateTags/DeleteTags/DescribeTags, and those three list
|
||||
// ResourceNotFoundFault (404) for a missing resource and do not list the
|
||||
// grant-specific fault at all. The three sibling cases above are consistent
|
||||
// for the same reason -- ClusterNotFound, ClusterSnapshotNotFound and
|
||||
// ClusterParameterGroupNotFound are each modelled at 404. The grant fault is
|
||||
// modelled at 400, so emitting it here would pair a code with a status the
|
||||
// model never gives it.
|
||||
SnapshotCopyGrant grant = snapshotCopyGrants.get(id)
|
||||
.orElseThrow(() -> new AwsException("ResourceNotFoundFault", "Snapshot copy grant " + id + " not found", 404));
|
||||
yield new TagHandle(grant.getTags(), updated -> {
|
||||
grant.setTags(updated);
|
||||
snapshotCopyGrants.put(id, grant);
|
||||
snapshotCopyGrants.flush();
|
||||
});
|
||||
}
|
||||
default -> throw new AwsException("InvalidParameterValue",
|
||||
"Tagging for resource type '" + type + "' is not supported: " + resourceName, 400);
|
||||
};
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package io.github.hectorvent.floci.services.redshift.model;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RegisterForReflection
|
||||
public class SnapshotCopyGrant {
|
||||
private String snapshotCopyGrantName;
|
||||
private String kmsKeyId;
|
||||
private Map<String, String> tags = new LinkedHashMap<>();
|
||||
|
||||
public SnapshotCopyGrant() {}
|
||||
|
||||
public SnapshotCopyGrant(String snapshotCopyGrantName, String kmsKeyId) {
|
||||
this.snapshotCopyGrantName = snapshotCopyGrantName;
|
||||
this.kmsKeyId = kmsKeyId;
|
||||
}
|
||||
|
||||
public String getSnapshotCopyGrantName() { return snapshotCopyGrantName; }
|
||||
public void setSnapshotCopyGrantName(String snapshotCopyGrantName) { this.snapshotCopyGrantName = snapshotCopyGrantName; }
|
||||
public String getKmsKeyId() { return kmsKeyId; }
|
||||
public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; }
|
||||
public Map<String, String> getTags() { return tags; }
|
||||
public void setTags(Map<String, String> tags) { this.tags = tags; }
|
||||
}
|
||||
Reference in new issue
Block a user