mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 08:31:53 -05:00
feat(ec2): add EC2 service with 61 operations, integration tests, and docs (#213)
* feat(ec2): adding ec2 service * feat(ec2): add EC2 service with 61 operations, integration tests, and docs
This commit is contained in:
1 parent
5381127165
commit
2859d257b5
36 files changed
+4630
-2
No files matched your search
@@ -190,6 +190,7 @@ public interface EmulatorConfig {
|
||||
AcmServiceConfig acm();
|
||||
SesServiceConfig ses();
|
||||
OpenSearchServiceConfig opensearch();
|
||||
Ec2ServiceConfig ec2();
|
||||
EcsServiceConfig ecs();
|
||||
}
|
||||
|
||||
@@ -423,6 +424,11 @@ public interface EmulatorConfig {
|
||||
Optional<String> dockerNetwork();
|
||||
}
|
||||
|
||||
interface Ec2ServiceConfig {
|
||||
@WithDefault("true")
|
||||
boolean enabled();
|
||||
}
|
||||
|
||||
interface InitHooksConfig {
|
||||
@WithDefault("/bin/bash")
|
||||
String shellExecutable();
|
||||
|
||||
@@ -15,6 +15,7 @@ public final class AwsNamespaces {
|
||||
public static final String CW = "http://monitoring.amazonaws.com/doc/2010-08-01/";
|
||||
public static final String S3 = "http://s3.amazonaws.com/doc/2006-03-01/";
|
||||
public static final String SES = "http://ses.amazonaws.com/doc/2010-12-01/";
|
||||
public static final String EC2 = "http://ec2.amazonaws.com/doc/2016-11-15/";
|
||||
|
||||
private AwsNamespaces() {}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.github.hectorvent.floci.core.common;
|
||||
|
||||
import io.github.hectorvent.floci.services.cloudformation.CloudFormationQueryHandler;
|
||||
import io.github.hectorvent.floci.services.ec2.Ec2QueryHandler;
|
||||
import io.github.hectorvent.floci.services.cloudwatch.metrics.CloudWatchMetricsQueryHandler;
|
||||
import io.github.hectorvent.floci.services.cognito.CognitoJsonHandler;
|
||||
import io.github.hectorvent.floci.services.elasticache.ElastiCacheQueryHandler;
|
||||
@@ -101,6 +102,29 @@ public class AwsQueryController {
|
||||
"GetAccountSummary", "GetAccountAuthorizationDetails"
|
||||
);
|
||||
|
||||
private static final Set<String> EC2_ACTIONS = Set.of(
|
||||
"RunInstances", "DescribeInstances", "TerminateInstances", "StartInstances", "StopInstances",
|
||||
"RebootInstances", "DescribeInstanceStatus", "DescribeInstanceAttribute", "ModifyInstanceAttribute",
|
||||
"CreateVpc", "DescribeVpcs", "DeleteVpc", "ModifyVpcAttribute", "DescribeVpcAttribute",
|
||||
"CreateDefaultVpc", "AssociateVpcCidrBlock", "DisassociateVpcCidrBlock",
|
||||
"CreateSubnet", "DescribeSubnets", "DeleteSubnet", "ModifySubnetAttribute",
|
||||
"CreateSecurityGroup", "DescribeSecurityGroups", "DeleteSecurityGroup",
|
||||
"AuthorizeSecurityGroupIngress", "AuthorizeSecurityGroupEgress",
|
||||
"RevokeSecurityGroupIngress", "RevokeSecurityGroupEgress",
|
||||
"DescribeSecurityGroupRules", "ModifySecurityGroupRules",
|
||||
"UpdateSecurityGroupRuleDescriptionsIngress", "UpdateSecurityGroupRuleDescriptionsEgress",
|
||||
"CreateKeyPair", "DescribeKeyPairs", "DeleteKeyPair", "ImportKeyPair",
|
||||
"DescribeImages",
|
||||
"CreateTags", "DeleteTags", "DescribeTags",
|
||||
"CreateInternetGateway", "DescribeInternetGateways", "DeleteInternetGateway",
|
||||
"AttachInternetGateway", "DetachInternetGateway",
|
||||
"CreateRouteTable", "DescribeRouteTables", "DeleteRouteTable",
|
||||
"AssociateRouteTable", "DisassociateRouteTable", "CreateRoute", "DeleteRoute",
|
||||
"AllocateAddress", "AssociateAddress", "DisassociateAddress", "ReleaseAddress", "DescribeAddresses",
|
||||
"DescribeAvailabilityZones", "DescribeRegions", "DescribeAccountAttributes",
|
||||
"DescribeInstanceTypes"
|
||||
);
|
||||
|
||||
private final CloudFormationQueryHandler cloudFormationQueryHandler;
|
||||
private final ElastiCacheQueryHandler elastiCacheQueryHandler;
|
||||
private final RdsQueryHandler rdsQueryHandler;
|
||||
@@ -111,6 +135,7 @@ public class AwsQueryController {
|
||||
private final StsQueryHandler stsQueryHandler;
|
||||
private final CloudWatchMetricsQueryHandler cloudWatchMetricsQueryHandler;
|
||||
private final CognitoJsonHandler cognitoJsonHandler;
|
||||
private final Ec2QueryHandler ec2QueryHandler;
|
||||
private final RegionResolver regionResolver;
|
||||
|
||||
@Inject
|
||||
@@ -122,6 +147,7 @@ public class AwsQueryController {
|
||||
IamQueryHandler iamQueryHandler, StsQueryHandler stsQueryHandler,
|
||||
CloudWatchMetricsQueryHandler cloudWatchMetricsQueryHandler,
|
||||
CognitoJsonHandler cognitoJsonHandler,
|
||||
Ec2QueryHandler ec2QueryHandler,
|
||||
RegionResolver regionResolver) {
|
||||
this.cloudFormationQueryHandler = cloudFormationQueryHandler;
|
||||
this.elastiCacheQueryHandler = elastiCacheQueryHandler;
|
||||
@@ -133,6 +159,7 @@ public class AwsQueryController {
|
||||
this.stsQueryHandler = stsQueryHandler;
|
||||
this.cloudWatchMetricsQueryHandler = cloudWatchMetricsQueryHandler;
|
||||
this.cognitoJsonHandler = cognitoJsonHandler;
|
||||
this.ec2QueryHandler = ec2QueryHandler;
|
||||
this.regionResolver = regionResolver;
|
||||
}
|
||||
|
||||
@@ -165,6 +192,7 @@ public class AwsQueryController {
|
||||
case "monitoring" -> cloudWatchMetricsQueryHandler.handle(action, formParams, region);
|
||||
case "cloudformation" -> cloudFormationQueryHandler.handle(action, formParams, region);
|
||||
case "cognito-idp" -> handleCognitoQuery(action, formParams, region);
|
||||
case "ec2" -> ec2QueryHandler.handle(action, formParams, region);
|
||||
default -> xmlErrorResponse("UnknownService",
|
||||
"Unknown or unsupported service: " + service, 400);
|
||||
};
|
||||
@@ -239,7 +267,7 @@ public class AwsQueryController {
|
||||
"AdminAddUserToGroup", "AdminRemoveUserFromGroup", "AdminListGroupsForUser"
|
||||
);
|
||||
|
||||
private static final Set<String> QUERY_PROTOCOL_SERVICES = Set.of("sqs", "sns", "iam", "sts", "elasticache", "rds", "monitoring", "cloudformation", "email", "cognito-idp");
|
||||
private static final Set<String> QUERY_PROTOCOL_SERVICES = Set.of("sqs", "sns", "iam", "sts", "elasticache", "rds", "monitoring", "cloudformation", "email", "cognito-idp", "ec2");
|
||||
|
||||
private String resolveService(String authorization, String action) {
|
||||
if (authorization != null && !authorization.isEmpty()) {
|
||||
@@ -282,6 +310,9 @@ public class AwsQueryController {
|
||||
if (COGNITO_ACTIONS.contains(action)) {
|
||||
return "cognito-idp";
|
||||
}
|
||||
if (EC2_ACTIONS.contains(action)) {
|
||||
return "ec2";
|
||||
}
|
||||
// SQS actions are numerous and not enumerated — fall back to sqs only for
|
||||
// requests that arrived without an Authorization header (raw/test clients)
|
||||
return "sqs";
|
||||
|
||||
@@ -50,6 +50,7 @@ public class ServiceRegistry {
|
||||
case "acm" -> config.services().acm().enabled();
|
||||
case "email" -> config.services().ses().enabled();
|
||||
case "es" -> config.services().opensearch().enabled();
|
||||
case "ec2" -> config.services().ec2().enabled();
|
||||
case "ecs" -> config.services().ecs().enabled();
|
||||
default -> true;
|
||||
};
|
||||
@@ -80,7 +81,6 @@ public class ServiceRegistry {
|
||||
if (config.services().acm().enabled()) enabled.add("acm");
|
||||
if (config.services().ses().enabled()) enabled.add("email");
|
||||
if (config.services().opensearch().enabled()) enabled.add("es");
|
||||
if (config.services().ecs().enabled()) enabled.add("ecs");
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ public class ServiceRegistry {
|
||||
services.put("acm", status(config.services().acm().enabled()));
|
||||
services.put("email", status(config.services().ses().enabled()));
|
||||
services.put("es", status(config.services().opensearch().enabled()));
|
||||
services.put("ec2", status(config.services().ec2().enabled()));
|
||||
services.put("ecs", status(config.services().ecs().enabled()));
|
||||
return services;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,51 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Address {
|
||||
|
||||
private String allocationId;
|
||||
private String publicIp;
|
||||
private String domain = "vpc";
|
||||
private String instanceId;
|
||||
private String associationId;
|
||||
private String networkInterfaceId;
|
||||
private String privateIpAddress;
|
||||
private String region;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public Address() {}
|
||||
|
||||
public String getAllocationId() { return allocationId; }
|
||||
public void setAllocationId(String allocationId) { this.allocationId = allocationId; }
|
||||
|
||||
public String getPublicIp() { return publicIp; }
|
||||
public void setPublicIp(String publicIp) { this.publicIp = publicIp; }
|
||||
|
||||
public String getDomain() { return domain; }
|
||||
public void setDomain(String domain) { this.domain = domain; }
|
||||
|
||||
public String getInstanceId() { return instanceId; }
|
||||
public void setInstanceId(String instanceId) { this.instanceId = instanceId; }
|
||||
|
||||
public String getAssociationId() { return associationId; }
|
||||
public void setAssociationId(String associationId) { this.associationId = associationId; }
|
||||
|
||||
public String getNetworkInterfaceId() { return networkInterfaceId; }
|
||||
public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; }
|
||||
|
||||
public String getPrivateIpAddress() { return privateIpAddress; }
|
||||
public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class GroupIdentifier {
|
||||
|
||||
private String groupId;
|
||||
private String groupName;
|
||||
|
||||
public GroupIdentifier() {}
|
||||
|
||||
public GroupIdentifier(String groupId, String groupName) {
|
||||
this.groupId = groupId;
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupId() { return groupId; }
|
||||
public void setGroupId(String groupId) { this.groupId = groupId; }
|
||||
|
||||
public String getGroupName() { return groupName; }
|
||||
public void setGroupName(String groupName) { this.groupName = groupName; }
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Image {
|
||||
|
||||
private String imageId;
|
||||
private String name;
|
||||
private String description;
|
||||
private String state = "available";
|
||||
private String ownerId = "amazon";
|
||||
private boolean isPublic = true;
|
||||
private String architecture;
|
||||
private String rootDeviceType = "ebs";
|
||||
private String rootDeviceName = "/dev/xvda";
|
||||
private String virtualizationType = "hvm";
|
||||
private String hypervisor = "xen";
|
||||
private String platform;
|
||||
private String imageOwnerAlias = "amazon";
|
||||
private String creationDate;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public Image() {}
|
||||
|
||||
public String getImageId() { return imageId; }
|
||||
public void setImageId(String imageId) { this.imageId = imageId; }
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public String getState() { return state; }
|
||||
public void setState(String state) { this.state = state; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public boolean isPublic() { return isPublic; }
|
||||
public void setPublic(boolean aPublic) { isPublic = aPublic; }
|
||||
|
||||
public String getArchitecture() { return architecture; }
|
||||
public void setArchitecture(String architecture) { this.architecture = architecture; }
|
||||
|
||||
public String getRootDeviceType() { return rootDeviceType; }
|
||||
public void setRootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; }
|
||||
|
||||
public String getRootDeviceName() { return rootDeviceName; }
|
||||
public void setRootDeviceName(String rootDeviceName) { this.rootDeviceName = rootDeviceName; }
|
||||
|
||||
public String getVirtualizationType() { return virtualizationType; }
|
||||
public void setVirtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; }
|
||||
|
||||
public String getHypervisor() { return hypervisor; }
|
||||
public void setHypervisor(String hypervisor) { this.hypervisor = hypervisor; }
|
||||
|
||||
public String getPlatform() { return platform; }
|
||||
public void setPlatform(String platform) { this.platform = platform; }
|
||||
|
||||
public String getImageOwnerAlias() { return imageOwnerAlias; }
|
||||
public void setImageOwnerAlias(String imageOwnerAlias) { this.imageOwnerAlias = imageOwnerAlias; }
|
||||
|
||||
public String getCreationDate() { return creationDate; }
|
||||
public void setCreationDate(String creationDate) { this.creationDate = creationDate; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Instance {
|
||||
|
||||
private String instanceId;
|
||||
private String imageId;
|
||||
private InstanceState state;
|
||||
private String stateTransitionReason;
|
||||
private String instanceType;
|
||||
private Placement placement;
|
||||
private String subnetId;
|
||||
private String vpcId;
|
||||
private String privateIpAddress;
|
||||
private String publicIpAddress;
|
||||
private String privateDnsName;
|
||||
private String publicDnsName;
|
||||
private String keyName;
|
||||
private List<GroupIdentifier> securityGroups = new ArrayList<>();
|
||||
private List<InstanceNetworkInterface> networkInterfaces = new ArrayList<>();
|
||||
private String architecture;
|
||||
private String hypervisor = "xen";
|
||||
private String virtualizationType = "hvm";
|
||||
private String rootDeviceName = "/dev/xvda";
|
||||
private String rootDeviceType = "ebs";
|
||||
private Instant launchTime;
|
||||
private int amiLaunchIndex;
|
||||
private String clientToken;
|
||||
private String monitoring = "disabled";
|
||||
private boolean sourceDestCheck = true;
|
||||
private boolean ebsOptimized = false;
|
||||
private boolean enaSupport = true;
|
||||
private String iamInstanceProfileArn;
|
||||
private String region;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public Instance() {}
|
||||
|
||||
public String getInstanceId() { return instanceId; }
|
||||
public void setInstanceId(String instanceId) { this.instanceId = instanceId; }
|
||||
|
||||
public String getImageId() { return imageId; }
|
||||
public void setImageId(String imageId) { this.imageId = imageId; }
|
||||
|
||||
public InstanceState getState() { return state; }
|
||||
public void setState(InstanceState state) { this.state = state; }
|
||||
|
||||
public String getStateTransitionReason() { return stateTransitionReason; }
|
||||
public void setStateTransitionReason(String stateTransitionReason) { this.stateTransitionReason = stateTransitionReason; }
|
||||
|
||||
public String getInstanceType() { return instanceType; }
|
||||
public void setInstanceType(String instanceType) { this.instanceType = instanceType; }
|
||||
|
||||
public Placement getPlacement() { return placement; }
|
||||
public void setPlacement(Placement placement) { this.placement = placement; }
|
||||
|
||||
public String getSubnetId() { return subnetId; }
|
||||
public void setSubnetId(String subnetId) { this.subnetId = subnetId; }
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getPrivateIpAddress() { return privateIpAddress; }
|
||||
public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; }
|
||||
|
||||
public String getPublicIpAddress() { return publicIpAddress; }
|
||||
public void setPublicIpAddress(String publicIpAddress) { this.publicIpAddress = publicIpAddress; }
|
||||
|
||||
public String getPrivateDnsName() { return privateDnsName; }
|
||||
public void setPrivateDnsName(String privateDnsName) { this.privateDnsName = privateDnsName; }
|
||||
|
||||
public String getPublicDnsName() { return publicDnsName; }
|
||||
public void setPublicDnsName(String publicDnsName) { this.publicDnsName = publicDnsName; }
|
||||
|
||||
public String getKeyName() { return keyName; }
|
||||
public void setKeyName(String keyName) { this.keyName = keyName; }
|
||||
|
||||
public List<GroupIdentifier> getSecurityGroups() { return securityGroups; }
|
||||
public void setSecurityGroups(List<GroupIdentifier> securityGroups) { this.securityGroups = securityGroups; }
|
||||
|
||||
public List<InstanceNetworkInterface> getNetworkInterfaces() { return networkInterfaces; }
|
||||
public void setNetworkInterfaces(List<InstanceNetworkInterface> networkInterfaces) { this.networkInterfaces = networkInterfaces; }
|
||||
|
||||
public String getArchitecture() { return architecture; }
|
||||
public void setArchitecture(String architecture) { this.architecture = architecture; }
|
||||
|
||||
public String getHypervisor() { return hypervisor; }
|
||||
public void setHypervisor(String hypervisor) { this.hypervisor = hypervisor; }
|
||||
|
||||
public String getVirtualizationType() { return virtualizationType; }
|
||||
public void setVirtualizationType(String virtualizationType) { this.virtualizationType = virtualizationType; }
|
||||
|
||||
public String getRootDeviceName() { return rootDeviceName; }
|
||||
public void setRootDeviceName(String rootDeviceName) { this.rootDeviceName = rootDeviceName; }
|
||||
|
||||
public String getRootDeviceType() { return rootDeviceType; }
|
||||
public void setRootDeviceType(String rootDeviceType) { this.rootDeviceType = rootDeviceType; }
|
||||
|
||||
public Instant getLaunchTime() { return launchTime; }
|
||||
public void setLaunchTime(Instant launchTime) { this.launchTime = launchTime; }
|
||||
|
||||
public int getAmiLaunchIndex() { return amiLaunchIndex; }
|
||||
public void setAmiLaunchIndex(int amiLaunchIndex) { this.amiLaunchIndex = amiLaunchIndex; }
|
||||
|
||||
public String getClientToken() { return clientToken; }
|
||||
public void setClientToken(String clientToken) { this.clientToken = clientToken; }
|
||||
|
||||
public String getMonitoring() { return monitoring; }
|
||||
public void setMonitoring(String monitoring) { this.monitoring = monitoring; }
|
||||
|
||||
public boolean isSourceDestCheck() { return sourceDestCheck; }
|
||||
public void setSourceDestCheck(boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; }
|
||||
|
||||
public boolean isEbsOptimized() { return ebsOptimized; }
|
||||
public void setEbsOptimized(boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; }
|
||||
|
||||
public boolean isEnaSupport() { return enaSupport; }
|
||||
public void setEnaSupport(boolean enaSupport) { this.enaSupport = enaSupport; }
|
||||
|
||||
public String getIamInstanceProfileArn() { return iamInstanceProfileArn; }
|
||||
public void setIamInstanceProfileArn(String iamInstanceProfileArn) { this.iamInstanceProfileArn = iamInstanceProfileArn; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InstanceNetworkInterface {
|
||||
|
||||
private String networkInterfaceId;
|
||||
private String subnetId;
|
||||
private String vpcId;
|
||||
private String description;
|
||||
private String ownerId;
|
||||
private String status = "in-use";
|
||||
private String macAddress;
|
||||
private String privateIpAddress;
|
||||
private String privateDnsName;
|
||||
private boolean sourceDestCheck = true;
|
||||
private List<GroupIdentifier> groups = new ArrayList<>();
|
||||
|
||||
public InstanceNetworkInterface() {}
|
||||
|
||||
public String getNetworkInterfaceId() { return networkInterfaceId; }
|
||||
public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; }
|
||||
|
||||
public String getSubnetId() { return subnetId; }
|
||||
public void setSubnetId(String subnetId) { this.subnetId = subnetId; }
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
|
||||
public String getMacAddress() { return macAddress; }
|
||||
public void setMacAddress(String macAddress) { this.macAddress = macAddress; }
|
||||
|
||||
public String getPrivateIpAddress() { return privateIpAddress; }
|
||||
public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; }
|
||||
|
||||
public String getPrivateDnsName() { return privateDnsName; }
|
||||
public void setPrivateDnsName(String privateDnsName) { this.privateDnsName = privateDnsName; }
|
||||
|
||||
public boolean isSourceDestCheck() { return sourceDestCheck; }
|
||||
public void setSourceDestCheck(boolean sourceDestCheck) { this.sourceDestCheck = sourceDestCheck; }
|
||||
|
||||
public List<GroupIdentifier> getGroups() { return groups; }
|
||||
public void setGroups(List<GroupIdentifier> groups) { this.groups = groups; }
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InstanceState {
|
||||
|
||||
private int code;
|
||||
private String name;
|
||||
|
||||
public InstanceState() {}
|
||||
|
||||
public InstanceState(int code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static InstanceState pending() { return new InstanceState(0, "pending"); }
|
||||
public static InstanceState running() { return new InstanceState(16, "running"); }
|
||||
public static InstanceState shuttingDown() { return new InstanceState(32, "shutting-down"); }
|
||||
public static InstanceState terminated() { return new InstanceState(48, "terminated"); }
|
||||
public static InstanceState stopping() { return new InstanceState(64, "stopping"); }
|
||||
public static InstanceState stopped() { return new InstanceState(80, "stopped"); }
|
||||
|
||||
public int getCode() { return code; }
|
||||
public void setCode(int code) { this.code = code; }
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InternetGateway {
|
||||
|
||||
private String internetGatewayId;
|
||||
private String ownerId;
|
||||
private String region;
|
||||
private List<InternetGatewayAttachment> attachments = new ArrayList<>();
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public InternetGateway() {}
|
||||
|
||||
public String getInternetGatewayId() { return internetGatewayId; }
|
||||
public void setInternetGatewayId(String internetGatewayId) { this.internetGatewayId = internetGatewayId; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<InternetGatewayAttachment> getAttachments() { return attachments; }
|
||||
public void setAttachments(List<InternetGatewayAttachment> attachments) { this.attachments = attachments; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InternetGatewayAttachment {
|
||||
|
||||
private String vpcId;
|
||||
private String state;
|
||||
|
||||
public InternetGatewayAttachment() {}
|
||||
|
||||
public InternetGatewayAttachment(String vpcId, String state) {
|
||||
this.vpcId = vpcId;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getState() { return state; }
|
||||
public void setState(String state) { this.state = state; }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class IpPermission {
|
||||
|
||||
private String ipProtocol;
|
||||
private Integer fromPort;
|
||||
private Integer toPort;
|
||||
private List<IpRange> ipRanges = new ArrayList<>();
|
||||
private List<Ipv6Range> ipv6Ranges = new ArrayList<>();
|
||||
private List<UserIdGroupPair> userIdGroupPairs = new ArrayList<>();
|
||||
|
||||
public IpPermission() {}
|
||||
|
||||
public String getIpProtocol() { return ipProtocol; }
|
||||
public void setIpProtocol(String ipProtocol) { this.ipProtocol = ipProtocol; }
|
||||
|
||||
public Integer getFromPort() { return fromPort; }
|
||||
public void setFromPort(Integer fromPort) { this.fromPort = fromPort; }
|
||||
|
||||
public Integer getToPort() { return toPort; }
|
||||
public void setToPort(Integer toPort) { this.toPort = toPort; }
|
||||
|
||||
public List<IpRange> getIpRanges() { return ipRanges; }
|
||||
public void setIpRanges(List<IpRange> ipRanges) { this.ipRanges = ipRanges; }
|
||||
|
||||
public List<Ipv6Range> getIpv6Ranges() { return ipv6Ranges; }
|
||||
public void setIpv6Ranges(List<Ipv6Range> ipv6Ranges) { this.ipv6Ranges = ipv6Ranges; }
|
||||
|
||||
public List<UserIdGroupPair> getUserIdGroupPairs() { return userIdGroupPairs; }
|
||||
public void setUserIdGroupPairs(List<UserIdGroupPair> userIdGroupPairs) { this.userIdGroupPairs = userIdGroupPairs; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class IpRange {
|
||||
|
||||
private String cidrIp;
|
||||
private String description;
|
||||
|
||||
public IpRange() {}
|
||||
|
||||
public IpRange(String cidrIp) {
|
||||
this.cidrIp = cidrIp;
|
||||
}
|
||||
|
||||
public IpRange(String cidrIp, String description) {
|
||||
this.cidrIp = cidrIp;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCidrIp() { return cidrIp; }
|
||||
public void setCidrIp(String cidrIp) { this.cidrIp = cidrIp; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Ipv6Range {
|
||||
|
||||
private String cidrIpv6;
|
||||
private String description;
|
||||
|
||||
public Ipv6Range() {}
|
||||
|
||||
public Ipv6Range(String cidrIpv6) {
|
||||
this.cidrIpv6 = cidrIpv6;
|
||||
}
|
||||
|
||||
public String getCidrIpv6() { return cidrIpv6; }
|
||||
public void setCidrIpv6(String cidrIpv6) { this.cidrIpv6 = cidrIpv6; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class KeyPair {
|
||||
|
||||
private String keyName;
|
||||
private String keyPairId;
|
||||
private String keyFingerprint;
|
||||
private String keyMaterial;
|
||||
private String region;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public KeyPair() {}
|
||||
|
||||
public String getKeyName() { return keyName; }
|
||||
public void setKeyName(String keyName) { this.keyName = keyName; }
|
||||
|
||||
public String getKeyPairId() { return keyPairId; }
|
||||
public void setKeyPairId(String keyPairId) { this.keyPairId = keyPairId; }
|
||||
|
||||
public String getKeyFingerprint() { return keyFingerprint; }
|
||||
public void setKeyFingerprint(String keyFingerprint) { this.keyFingerprint = keyFingerprint; }
|
||||
|
||||
public String getKeyMaterial() { return keyMaterial; }
|
||||
public void setKeyMaterial(String keyMaterial) { this.keyMaterial = keyMaterial; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Placement {
|
||||
|
||||
private String availabilityZone;
|
||||
private String tenancy = "default";
|
||||
private String groupName;
|
||||
|
||||
public Placement() {}
|
||||
|
||||
public Placement(String availabilityZone) {
|
||||
this.availabilityZone = availabilityZone;
|
||||
}
|
||||
|
||||
public String getAvailabilityZone() { return availabilityZone; }
|
||||
public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; }
|
||||
|
||||
public String getTenancy() { return tenancy; }
|
||||
public void setTenancy(String tenancy) { this.tenancy = tenancy; }
|
||||
|
||||
public String getGroupName() { return groupName; }
|
||||
public void setGroupName(String groupName) { this.groupName = groupName; }
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Reservation {
|
||||
|
||||
private String reservationId;
|
||||
private String ownerId;
|
||||
private List<GroupIdentifier> groups = new ArrayList<>();
|
||||
private List<Instance> instances = new ArrayList<>();
|
||||
|
||||
public Reservation() {}
|
||||
|
||||
public String getReservationId() { return reservationId; }
|
||||
public void setReservationId(String reservationId) { this.reservationId = reservationId; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public List<GroupIdentifier> getGroups() { return groups; }
|
||||
public void setGroups(List<GroupIdentifier> groups) { this.groups = groups; }
|
||||
|
||||
public List<Instance> getInstances() { return instances; }
|
||||
public void setInstances(List<Instance> instances) { this.instances = instances; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Route {
|
||||
|
||||
private String destinationCidrBlock;
|
||||
private String gatewayId;
|
||||
private String state = "active";
|
||||
private String origin;
|
||||
|
||||
public Route() {}
|
||||
|
||||
public Route(String destinationCidrBlock, String gatewayId, String origin) {
|
||||
this.destinationCidrBlock = destinationCidrBlock;
|
||||
this.gatewayId = gatewayId;
|
||||
this.origin = origin;
|
||||
}
|
||||
|
||||
public String getDestinationCidrBlock() { return destinationCidrBlock; }
|
||||
public void setDestinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; }
|
||||
|
||||
public String getGatewayId() { return gatewayId; }
|
||||
public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; }
|
||||
|
||||
public String getState() { return state; }
|
||||
public void setState(String state) { this.state = state; }
|
||||
|
||||
public String getOrigin() { return origin; }
|
||||
public void setOrigin(String origin) { this.origin = origin; }
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RouteTable {
|
||||
|
||||
private String routeTableId;
|
||||
private String vpcId;
|
||||
private String ownerId;
|
||||
private String region;
|
||||
private List<Route> routes = new ArrayList<>();
|
||||
private List<RouteTableAssociation> associations = new ArrayList<>();
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public RouteTable() {}
|
||||
|
||||
public String getRouteTableId() { return routeTableId; }
|
||||
public void setRouteTableId(String routeTableId) { this.routeTableId = routeTableId; }
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<Route> getRoutes() { return routes; }
|
||||
public void setRoutes(List<Route> routes) { this.routes = routes; }
|
||||
|
||||
public List<RouteTableAssociation> getAssociations() { return associations; }
|
||||
public void setAssociations(List<RouteTableAssociation> associations) { this.associations = associations; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RouteTableAssociation {
|
||||
|
||||
private String routeTableAssociationId;
|
||||
private String routeTableId;
|
||||
private String subnetId;
|
||||
private boolean main;
|
||||
private String associationState = "associated";
|
||||
|
||||
public RouteTableAssociation() {}
|
||||
|
||||
public String getRouteTableAssociationId() { return routeTableAssociationId; }
|
||||
public void setRouteTableAssociationId(String routeTableAssociationId) { this.routeTableAssociationId = routeTableAssociationId; }
|
||||
|
||||
public String getRouteTableId() { return routeTableId; }
|
||||
public void setRouteTableId(String routeTableId) { this.routeTableId = routeTableId; }
|
||||
|
||||
public String getSubnetId() { return subnetId; }
|
||||
public void setSubnetId(String subnetId) { this.subnetId = subnetId; }
|
||||
|
||||
public boolean isMain() { return main; }
|
||||
public void setMain(boolean main) { this.main = main; }
|
||||
|
||||
public String getAssociationState() { return associationState; }
|
||||
public void setAssociationState(String associationState) { this.associationState = associationState; }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class SecurityGroup {
|
||||
|
||||
private String groupId;
|
||||
private String groupName;
|
||||
private String description;
|
||||
private String vpcId;
|
||||
private String ownerId;
|
||||
private String region;
|
||||
private List<IpPermission> ipPermissions = new ArrayList<>();
|
||||
private List<IpPermission> ipPermissionsEgress = new ArrayList<>();
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public SecurityGroup() {}
|
||||
|
||||
public String getGroupId() { return groupId; }
|
||||
public void setGroupId(String groupId) { this.groupId = groupId; }
|
||||
|
||||
public String getGroupName() { return groupName; }
|
||||
public void setGroupName(String groupName) { this.groupName = groupName; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<IpPermission> getIpPermissions() { return ipPermissions; }
|
||||
public void setIpPermissions(List<IpPermission> ipPermissions) { this.ipPermissions = ipPermissions; }
|
||||
|
||||
public List<IpPermission> getIpPermissionsEgress() { return ipPermissionsEgress; }
|
||||
public void setIpPermissionsEgress(List<IpPermission> ipPermissionsEgress) { this.ipPermissionsEgress = ipPermissionsEgress; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class SecurityGroupRule {
|
||||
|
||||
private String securityGroupRuleId;
|
||||
private String groupId;
|
||||
private String groupOwnerId;
|
||||
private boolean isEgress;
|
||||
private String ipProtocol;
|
||||
private Integer fromPort;
|
||||
private Integer toPort;
|
||||
private String cidrIpv4;
|
||||
private String cidrIpv6;
|
||||
private String description;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public SecurityGroupRule() {}
|
||||
|
||||
public String getSecurityGroupRuleId() { return securityGroupRuleId; }
|
||||
public void setSecurityGroupRuleId(String securityGroupRuleId) { this.securityGroupRuleId = securityGroupRuleId; }
|
||||
|
||||
public String getGroupId() { return groupId; }
|
||||
public void setGroupId(String groupId) { this.groupId = groupId; }
|
||||
|
||||
public String getGroupOwnerId() { return groupOwnerId; }
|
||||
public void setGroupOwnerId(String groupOwnerId) { this.groupOwnerId = groupOwnerId; }
|
||||
|
||||
public boolean isEgress() { return isEgress; }
|
||||
public void setEgress(boolean egress) { isEgress = egress; }
|
||||
|
||||
public String getIpProtocol() { return ipProtocol; }
|
||||
public void setIpProtocol(String ipProtocol) { this.ipProtocol = ipProtocol; }
|
||||
|
||||
public Integer getFromPort() { return fromPort; }
|
||||
public void setFromPort(Integer fromPort) { this.fromPort = fromPort; }
|
||||
|
||||
public Integer getToPort() { return toPort; }
|
||||
public void setToPort(Integer toPort) { this.toPort = toPort; }
|
||||
|
||||
public String getCidrIpv4() { return cidrIpv4; }
|
||||
public void setCidrIpv4(String cidrIpv4) { this.cidrIpv4 = cidrIpv4; }
|
||||
|
||||
public String getCidrIpv6() { return cidrIpv6; }
|
||||
public void setCidrIpv6(String cidrIpv6) { this.cidrIpv6 = cidrIpv6; }
|
||||
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Subnet {
|
||||
|
||||
private String subnetId;
|
||||
private String vpcId;
|
||||
private String cidrBlock;
|
||||
private String state;
|
||||
private String availabilityZone;
|
||||
private String availabilityZoneId;
|
||||
private int availableIpAddressCount;
|
||||
private boolean defaultForAz;
|
||||
private boolean mapPublicIpOnLaunch;
|
||||
private String ownerId;
|
||||
private String region;
|
||||
private String subnetArn;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public Subnet() {}
|
||||
|
||||
public String getSubnetId() { return subnetId; }
|
||||
public void setSubnetId(String subnetId) { this.subnetId = subnetId; }
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getCidrBlock() { return cidrBlock; }
|
||||
public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; }
|
||||
|
||||
public String getState() { return state; }
|
||||
public void setState(String state) { this.state = state; }
|
||||
|
||||
public String getAvailabilityZone() { return availabilityZone; }
|
||||
public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; }
|
||||
|
||||
public String getAvailabilityZoneId() { return availabilityZoneId; }
|
||||
public void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; }
|
||||
|
||||
public int getAvailableIpAddressCount() { return availableIpAddressCount; }
|
||||
public void setAvailableIpAddressCount(int availableIpAddressCount) { this.availableIpAddressCount = availableIpAddressCount; }
|
||||
|
||||
public boolean isDefaultForAz() { return defaultForAz; }
|
||||
public void setDefaultForAz(boolean defaultForAz) { this.defaultForAz = defaultForAz; }
|
||||
|
||||
public boolean isMapPublicIpOnLaunch() { return mapPublicIpOnLaunch; }
|
||||
public void setMapPublicIpOnLaunch(boolean mapPublicIpOnLaunch) { this.mapPublicIpOnLaunch = mapPublicIpOnLaunch; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public String getSubnetArn() { return subnetArn; }
|
||||
public void setSubnetArn(String subnetArn) { this.subnetArn = subnetArn; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Tag {
|
||||
|
||||
private String key;
|
||||
private String value;
|
||||
|
||||
public Tag() {}
|
||||
|
||||
public Tag(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getKey() { return key; }
|
||||
public void setKey(String key) { this.key = key; }
|
||||
|
||||
public String getValue() { return value; }
|
||||
public void setValue(String value) { this.value = value; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class UserIdGroupPair {
|
||||
|
||||
private String groupId;
|
||||
private String userId;
|
||||
private String groupName;
|
||||
|
||||
public UserIdGroupPair() {}
|
||||
|
||||
public String getGroupId() { return groupId; }
|
||||
public void setGroupId(String groupId) { this.groupId = groupId; }
|
||||
|
||||
public String getUserId() { return userId; }
|
||||
public void setUserId(String userId) { this.userId = userId; }
|
||||
|
||||
public String getGroupName() { return groupName; }
|
||||
public void setGroupName(String groupName) { this.groupName = groupName; }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Vpc {
|
||||
|
||||
private String vpcId;
|
||||
private String cidrBlock;
|
||||
private String state;
|
||||
private String dhcpOptionsId = "dopt-default";
|
||||
private boolean isDefault;
|
||||
private String instanceTenancy = "default";
|
||||
private String ownerId;
|
||||
private String region;
|
||||
private List<VpcCidrBlockAssociation> cidrBlockAssociationSet = new ArrayList<>();
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
public Vpc() {}
|
||||
|
||||
public String getVpcId() { return vpcId; }
|
||||
public void setVpcId(String vpcId) { this.vpcId = vpcId; }
|
||||
|
||||
public String getCidrBlock() { return cidrBlock; }
|
||||
public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; }
|
||||
|
||||
public String getState() { return state; }
|
||||
public void setState(String state) { this.state = state; }
|
||||
|
||||
public String getDhcpOptionsId() { return dhcpOptionsId; }
|
||||
public void setDhcpOptionsId(String dhcpOptionsId) { this.dhcpOptionsId = dhcpOptionsId; }
|
||||
|
||||
public boolean isDefault() { return isDefault; }
|
||||
public void setDefault(boolean aDefault) { isDefault = aDefault; }
|
||||
|
||||
public String getInstanceTenancy() { return instanceTenancy; }
|
||||
public void setInstanceTenancy(String instanceTenancy) { this.instanceTenancy = instanceTenancy; }
|
||||
|
||||
public String getOwnerId() { return ownerId; }
|
||||
public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
|
||||
|
||||
public String getRegion() { return region; }
|
||||
public void setRegion(String region) { this.region = region; }
|
||||
|
||||
public List<VpcCidrBlockAssociation> getCidrBlockAssociationSet() { return cidrBlockAssociationSet; }
|
||||
public void setCidrBlockAssociationSet(List<VpcCidrBlockAssociation> cidrBlockAssociationSet) { this.cidrBlockAssociationSet = cidrBlockAssociationSet; }
|
||||
|
||||
public List<Tag> getTags() { return tags; }
|
||||
public void setTags(List<Tag> tags) { this.tags = tags; }
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package io.github.hectorvent.floci.services.ec2.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class VpcCidrBlockAssociation {
|
||||
|
||||
private String associationId;
|
||||
private String cidrBlock;
|
||||
private String cidrBlockState = "associated";
|
||||
|
||||
public VpcCidrBlockAssociation() {}
|
||||
|
||||
public VpcCidrBlockAssociation(String associationId, String cidrBlock) {
|
||||
this.associationId = associationId;
|
||||
this.cidrBlock = cidrBlock;
|
||||
}
|
||||
|
||||
public String getAssociationId() { return associationId; }
|
||||
public void setAssociationId(String associationId) { this.associationId = associationId; }
|
||||
|
||||
public String getCidrBlock() { return cidrBlock; }
|
||||
public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; }
|
||||
|
||||
public String getCidrBlockState() { return cidrBlockState; }
|
||||
public void setCidrBlockState(String cidrBlockState) { this.cidrBlockState = cidrBlockState; }
|
||||
}
|
||||
Reference in new issue
Block a user