software.amazon.awscdk.services.redshift.CfnEndpointAccessProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.redshift;
/**
* Properties for defining a `CfnEndpointAccess`.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.redshift.*;
* CfnEndpointAccessProps cfnEndpointAccessProps = CfnEndpointAccessProps.builder()
* .clusterIdentifier("clusterIdentifier")
* .endpointName("endpointName")
* .subnetGroupName("subnetGroupName")
* .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds"))
* // the properties below are optional
* .resourceOwner("resourceOwner")
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.74.0 (build 6d08790)", date = "2023-05-10T17:05:58.302Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.redshift.$Module.class, fqn = "@aws-cdk/aws-redshift.CfnEndpointAccessProps")
@software.amazon.jsii.Jsii.Proxy(CfnEndpointAccessProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnEndpointAccessProps extends software.amazon.jsii.JsiiSerializable {
/**
* The cluster identifier of the cluster associated with the endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getClusterIdentifier();
/**
* The name of the endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getEndpointName();
/**
* The subnet group name where Amazon Redshift chooses to deploy the endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getSubnetGroupName();
/**
* The security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.util.List getVpcSecurityGroupIds();
/**
* The AWS account ID of the owner of the cluster.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getResourceOwner() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnEndpointAccessProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnEndpointAccessProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String clusterIdentifier;
java.lang.String endpointName;
java.lang.String subnetGroupName;
java.util.List vpcSecurityGroupIds;
java.lang.String resourceOwner;
/**
* Sets the value of {@link CfnEndpointAccessProps#getClusterIdentifier}
* @param clusterIdentifier The cluster identifier of the cluster associated with the endpoint. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterIdentifier(java.lang.String clusterIdentifier) {
this.clusterIdentifier = clusterIdentifier;
return this;
}
/**
* Sets the value of {@link CfnEndpointAccessProps#getEndpointName}
* @param endpointName The name of the endpoint. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder endpointName(java.lang.String endpointName) {
this.endpointName = endpointName;
return this;
}
/**
* Sets the value of {@link CfnEndpointAccessProps#getSubnetGroupName}
* @param subnetGroupName The subnet group name where Amazon Redshift chooses to deploy the endpoint. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder subnetGroupName(java.lang.String subnetGroupName) {
this.subnetGroupName = subnetGroupName;
return this;
}
/**
* Sets the value of {@link CfnEndpointAccessProps#getVpcSecurityGroupIds}
* @param vpcSecurityGroupIds The security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcSecurityGroupIds(java.util.List vpcSecurityGroupIds) {
this.vpcSecurityGroupIds = vpcSecurityGroupIds;
return this;
}
/**
* Sets the value of {@link CfnEndpointAccessProps#getResourceOwner}
* @param resourceOwner The AWS account ID of the owner of the cluster.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder resourceOwner(java.lang.String resourceOwner) {
this.resourceOwner = resourceOwner;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnEndpointAccessProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnEndpointAccessProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnEndpointAccessProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnEndpointAccessProps {
private final java.lang.String clusterIdentifier;
private final java.lang.String endpointName;
private final java.lang.String subnetGroupName;
private final java.util.List vpcSecurityGroupIds;
private final java.lang.String resourceOwner;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.clusterIdentifier = software.amazon.jsii.Kernel.get(this, "clusterIdentifier", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.endpointName = software.amazon.jsii.Kernel.get(this, "endpointName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.subnetGroupName = software.amazon.jsii.Kernel.get(this, "subnetGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.vpcSecurityGroupIds = software.amazon.jsii.Kernel.get(this, "vpcSecurityGroupIds", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.resourceOwner = software.amazon.jsii.Kernel.get(this, "resourceOwner", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.clusterIdentifier = java.util.Objects.requireNonNull(builder.clusterIdentifier, "clusterIdentifier is required");
this.endpointName = java.util.Objects.requireNonNull(builder.endpointName, "endpointName is required");
this.subnetGroupName = java.util.Objects.requireNonNull(builder.subnetGroupName, "subnetGroupName is required");
this.vpcSecurityGroupIds = java.util.Objects.requireNonNull(builder.vpcSecurityGroupIds, "vpcSecurityGroupIds is required");
this.resourceOwner = builder.resourceOwner;
}
@Override
public final java.lang.String getClusterIdentifier() {
return this.clusterIdentifier;
}
@Override
public final java.lang.String getEndpointName() {
return this.endpointName;
}
@Override
public final java.lang.String getSubnetGroupName() {
return this.subnetGroupName;
}
@Override
public final java.util.List getVpcSecurityGroupIds() {
return this.vpcSecurityGroupIds;
}
@Override
public final java.lang.String getResourceOwner() {
return this.resourceOwner;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
data.set("clusterIdentifier", om.valueToTree(this.getClusterIdentifier()));
data.set("endpointName", om.valueToTree(this.getEndpointName()));
data.set("subnetGroupName", om.valueToTree(this.getSubnetGroupName()));
data.set("vpcSecurityGroupIds", om.valueToTree(this.getVpcSecurityGroupIds()));
if (this.getResourceOwner() != null) {
data.set("resourceOwner", om.valueToTree(this.getResourceOwner()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-redshift.CfnEndpointAccessProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CfnEndpointAccessProps.Jsii$Proxy that = (CfnEndpointAccessProps.Jsii$Proxy) o;
if (!clusterIdentifier.equals(that.clusterIdentifier)) return false;
if (!endpointName.equals(that.endpointName)) return false;
if (!subnetGroupName.equals(that.subnetGroupName)) return false;
if (!vpcSecurityGroupIds.equals(that.vpcSecurityGroupIds)) return false;
return this.resourceOwner != null ? this.resourceOwner.equals(that.resourceOwner) : that.resourceOwner == null;
}
@Override
public final int hashCode() {
int result = this.clusterIdentifier.hashCode();
result = 31 * result + (this.endpointName.hashCode());
result = 31 * result + (this.subnetGroupName.hashCode());
result = 31 * result + (this.vpcSecurityGroupIds.hashCode());
result = 31 * result + (this.resourceOwner != null ? this.resourceOwner.hashCode() : 0);
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy