cfdsl.ec2.NetworkInterfaceAttachment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cfdsl Show documentation
Show all versions of cfdsl Show documentation
Java DSL for Amazon CloudFormation templates
The newest version!
package cfdsl.ec2;
import cfdsl.resource.Resource;
import cfdsl.resource.ResourceBuilder;
/**
* AWS::EC2::NetworkInterfaceAttachment
* resource type.
*/
public final class NetworkInterfaceAttachment extends Resource {
private NetworkInterfaceAttachment(Builder b) {
super("AWS::EC2::NetworkInterfaceAttachment", b);
}
public static Builder between(
String logicalName,
Instance instance,
NetworkInterface networkInterface,
int deviceIndex) {
return new Builder(logicalName, instance, networkInterface, deviceIndex);
}
public static final class Builder extends ResourceBuilder {
private Builder(
String logicalName,
Instance instance,
NetworkInterface networkInterface,
int deviceIndex) {
super(logicalName);
addProperty("InstanceId", instance);
addProperty("NetworkInterfaceId", networkInterface);
addProperty("DeviceIndex", deviceIndex);
}
public Builder deleteOnTermination(boolean deleteOnTermination) {
addProperty("DeleteOnTermination", deleteOnTermination);
return this;
}
@Override
public NetworkInterfaceAttachment build() {
return new NetworkInterfaceAttachment(this);
}
}
}