enabledClusterLoggingTypes) {
this.props.enabledClusterLoggingTypes(enabledClusterLoggingTypes);
return this;
}
/**
* Encryption configuration for the cluster.
*
* @return {@code this}
* @param encryptionConfig Encryption configuration for the cluster. This parameter is required.
*/
public Builder encryptionConfig(final java.util.List extends com.my.module.EncryptionConfigEntry> encryptionConfig) {
this.props.encryptionConfig(encryptionConfig);
return this;
}
/**
* @return {@code this}
* @param kubernetesApiAccess This parameter is required.
*/
public Builder kubernetesApiAccess(final com.my.module.CfnClusterPropsKubernetesApiAccess kubernetesApiAccess) {
this.props.kubernetesApiAccess(kubernetesApiAccess);
return this;
}
/**
* Network configuration for Amazon EKS cluster.
*
* @return {@code this}
* @param kubernetesNetworkConfig Network configuration for Amazon EKS cluster. This parameter is required.
*/
public Builder kubernetesNetworkConfig(final com.my.module.CfnClusterPropsKubernetesNetworkConfig kubernetesNetworkConfig) {
this.props.kubernetesNetworkConfig(kubernetesNetworkConfig);
return this;
}
/**
* Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled.
*
* this provides permissions for Lambda to be invoked and attach to the cluster VPC
*
* @return {@code this}
* @param lambdaRoleName Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. This parameter is required.
*/
public Builder lambdaRoleName(final java.lang.String lambdaRoleName) {
this.props.lambdaRoleName(lambdaRoleName);
return this;
}
/**
* A unique name for your cluster.
*
* @return {@code this}
* @param name A unique name for your cluster. This parameter is required.
*/
public Builder name(final java.lang.String name) {
this.props.name(name);
return this;
}
/**
* @return {@code this}
* @param tags This parameter is required.
*/
public Builder tags(final java.util.List extends com.my.module.CfnClusterPropsTags> tags) {
this.props.tags(tags);
return this;
}
/**
* Desired Kubernetes version for your cluster.
*
* If you don't specify this value, the cluster uses the latest version from Amazon EKS.
*
* @return {@code this}
* @param version Desired Kubernetes version for your cluster. This parameter is required.
*/
public Builder version(final java.lang.String version) {
this.props.version(version);
return this;
}
/**
* @return a newly built instance of {@link com.my.module.CfnCluster}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public com.my.module.CfnCluster build() {
return new com.my.module.CfnCluster(
this.scope,
this.id,
this.props.build()
);
}
}
}
",
"src/main/java/com/my/module/CfnClusterProps.java" => "package com.my.module;
/**
* A resource that creates Amazon Elastic Kubernetes Service (Amazon EKS) clusters.
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterProps\\")
@software.amazon.jsii.Jsii.Proxy(CfnClusterProps.Jsii$Proxy.class)
public interface CfnClusterProps extends software.amazon.jsii.JsiiSerializable {
/**
* An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
*/
@org.jetbrains.annotations.NotNull com.my.module.CfnClusterPropsResourcesVpcConfig getResourcesVpcConfig();
/**
* Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role.
*
* This provides permissions for Amazon EKS to call other AWS APIs.
*/
@org.jetbrains.annotations.NotNull java.lang.String getRoleArn();
/**
* Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs.
*
* By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
*/
default @org.jetbrains.annotations.Nullable java.util.List getEnabledClusterLoggingTypes() {
return null;
}
/**
* Encryption configuration for the cluster.
*/
default @org.jetbrains.annotations.Nullable java.util.List getEncryptionConfig() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable com.my.module.CfnClusterPropsKubernetesApiAccess getKubernetesApiAccess() {
return null;
}
/**
* Network configuration for Amazon EKS cluster.
*/
default @org.jetbrains.annotations.Nullable com.my.module.CfnClusterPropsKubernetesNetworkConfig getKubernetesNetworkConfig() {
return null;
}
/**
* Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled.
*
* this provides permissions for Lambda to be invoked and attach to the cluster VPC
*/
default @org.jetbrains.annotations.Nullable java.lang.String getLambdaRoleName() {
return null;
}
/**
* A unique name for your cluster.
*/
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.util.List getTags() {
return null;
}
/**
* Desired Kubernetes version for your cluster.
*
* If you don't specify this value, the cluster uses the latest version from Amazon EKS.
*/
default @org.jetbrains.annotations.Nullable java.lang.String getVersion() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnClusterProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnClusterProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
com.my.module.CfnClusterPropsResourcesVpcConfig resourcesVpcConfig;
java.lang.String roleArn;
java.util.List enabledClusterLoggingTypes;
java.util.List encryptionConfig;
com.my.module.CfnClusterPropsKubernetesApiAccess kubernetesApiAccess;
com.my.module.CfnClusterPropsKubernetesNetworkConfig kubernetesNetworkConfig;
java.lang.String lambdaRoleName;
java.lang.String name;
java.util.List tags;
java.lang.String version;
/**
* Sets the value of {@link CfnClusterProps#getResourcesVpcConfig}
* @param resourcesVpcConfig An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster. This parameter is required.
* @return {@code this}
*/
public Builder resourcesVpcConfig(com.my.module.CfnClusterPropsResourcesVpcConfig resourcesVpcConfig) {
this.resourcesVpcConfig = resourcesVpcConfig;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getRoleArn}
* @param roleArn Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This parameter is required.
* This provides permissions for Amazon EKS to call other AWS APIs.
* @return {@code this}
*/
public Builder roleArn(java.lang.String roleArn) {
this.roleArn = roleArn;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getEnabledClusterLoggingTypes}
* @param enabledClusterLoggingTypes Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs.
* By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
* @return {@code this}
*/
public Builder enabledClusterLoggingTypes(java.util.List enabledClusterLoggingTypes) {
this.enabledClusterLoggingTypes = enabledClusterLoggingTypes;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getEncryptionConfig}
* @param encryptionConfig Encryption configuration for the cluster.
* @return {@code this}
*/
@SuppressWarnings(\\"unchecked\\")
public Builder encryptionConfig(java.util.List extends com.my.module.EncryptionConfigEntry> encryptionConfig) {
this.encryptionConfig = (java.util.List)encryptionConfig;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getKubernetesApiAccess}
* @param kubernetesApiAccess the value to be set.
* @return {@code this}
*/
public Builder kubernetesApiAccess(com.my.module.CfnClusterPropsKubernetesApiAccess kubernetesApiAccess) {
this.kubernetesApiAccess = kubernetesApiAccess;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getKubernetesNetworkConfig}
* @param kubernetesNetworkConfig Network configuration for Amazon EKS cluster.
* @return {@code this}
*/
public Builder kubernetesNetworkConfig(com.my.module.CfnClusterPropsKubernetesNetworkConfig kubernetesNetworkConfig) {
this.kubernetesNetworkConfig = kubernetesNetworkConfig;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getLambdaRoleName}
* @param lambdaRoleName Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled.
* this provides permissions for Lambda to be invoked and attach to the cluster VPC
* @return {@code this}
*/
public Builder lambdaRoleName(java.lang.String lambdaRoleName) {
this.lambdaRoleName = lambdaRoleName;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getName}
* @param name A unique name for your cluster.
* @return {@code this}
*/
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getTags}
* @param tags the value to be set.
* @return {@code this}
*/
@SuppressWarnings(\\"unchecked\\")
public Builder tags(java.util.List extends com.my.module.CfnClusterPropsTags> tags) {
this.tags = (java.util.List)tags;
return this;
}
/**
* Sets the value of {@link CfnClusterProps#getVersion}
* @param version Desired Kubernetes version for your cluster.
* If you don't specify this value, the cluster uses the latest version from Amazon EKS.
* @return {@code this}
*/
public Builder version(java.lang.String version) {
this.version = version;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnClusterProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CfnClusterProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnClusterProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnClusterProps {
private final com.my.module.CfnClusterPropsResourcesVpcConfig resourcesVpcConfig;
private final java.lang.String roleArn;
private final java.util.List enabledClusterLoggingTypes;
private final java.util.List encryptionConfig;
private final com.my.module.CfnClusterPropsKubernetesApiAccess kubernetesApiAccess;
private final com.my.module.CfnClusterPropsKubernetesNetworkConfig kubernetesNetworkConfig;
private final java.lang.String lambdaRoleName;
private final java.lang.String name;
private final java.util.List tags;
private final java.lang.String version;
/**
* 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.resourcesVpcConfig = software.amazon.jsii.Kernel.get(this, \\"resourcesVpcConfig\\", software.amazon.jsii.NativeType.forClass(com.my.module.CfnClusterPropsResourcesVpcConfig.class));
this.roleArn = software.amazon.jsii.Kernel.get(this, \\"roleArn\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.enabledClusterLoggingTypes = software.amazon.jsii.Kernel.get(this, \\"enabledClusterLoggingTypes\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.encryptionConfig = software.amazon.jsii.Kernel.get(this, \\"encryptionConfig\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.my.module.EncryptionConfigEntry.class)));
this.kubernetesApiAccess = software.amazon.jsii.Kernel.get(this, \\"kubernetesApiAccess\\", software.amazon.jsii.NativeType.forClass(com.my.module.CfnClusterPropsKubernetesApiAccess.class));
this.kubernetesNetworkConfig = software.amazon.jsii.Kernel.get(this, \\"kubernetesNetworkConfig\\", software.amazon.jsii.NativeType.forClass(com.my.module.CfnClusterPropsKubernetesNetworkConfig.class));
this.lambdaRoleName = software.amazon.jsii.Kernel.get(this, \\"lambdaRoleName\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.name = software.amazon.jsii.Kernel.get(this, \\"name\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.tags = software.amazon.jsii.Kernel.get(this, \\"tags\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.my.module.CfnClusterPropsTags.class)));
this.version = software.amazon.jsii.Kernel.get(this, \\"version\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings(\\"unchecked\\")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.resourcesVpcConfig = java.util.Objects.requireNonNull(builder.resourcesVpcConfig, \\"resourcesVpcConfig is required\\");
this.roleArn = java.util.Objects.requireNonNull(builder.roleArn, \\"roleArn is required\\");
this.enabledClusterLoggingTypes = builder.enabledClusterLoggingTypes;
this.encryptionConfig = (java.util.List)builder.encryptionConfig;
this.kubernetesApiAccess = builder.kubernetesApiAccess;
this.kubernetesNetworkConfig = builder.kubernetesNetworkConfig;
this.lambdaRoleName = builder.lambdaRoleName;
this.name = builder.name;
this.tags = (java.util.List)builder.tags;
this.version = builder.version;
}
@Override
public final com.my.module.CfnClusterPropsResourcesVpcConfig getResourcesVpcConfig() {
return this.resourcesVpcConfig;
}
@Override
public final java.lang.String getRoleArn() {
return this.roleArn;
}
@Override
public final java.util.List getEnabledClusterLoggingTypes() {
return this.enabledClusterLoggingTypes;
}
@Override
public final java.util.List getEncryptionConfig() {
return this.encryptionConfig;
}
@Override
public final com.my.module.CfnClusterPropsKubernetesApiAccess getKubernetesApiAccess() {
return this.kubernetesApiAccess;
}
@Override
public final com.my.module.CfnClusterPropsKubernetesNetworkConfig getKubernetesNetworkConfig() {
return this.kubernetesNetworkConfig;
}
@Override
public final java.lang.String getLambdaRoleName() {
return this.lambdaRoleName;
}
@Override
public final java.lang.String getName() {
return this.name;
}
@Override
public final java.util.List getTags() {
return this.tags;
}
@Override
public final java.lang.String getVersion() {
return this.version;
}
@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(\\"resourcesVpcConfig\\", om.valueToTree(this.getResourcesVpcConfig()));
data.set(\\"roleArn\\", om.valueToTree(this.getRoleArn()));
if (this.getEnabledClusterLoggingTypes() != null) {
data.set(\\"enabledClusterLoggingTypes\\", om.valueToTree(this.getEnabledClusterLoggingTypes()));
}
if (this.getEncryptionConfig() != null) {
data.set(\\"encryptionConfig\\", om.valueToTree(this.getEncryptionConfig()));
}
if (this.getKubernetesApiAccess() != null) {
data.set(\\"kubernetesApiAccess\\", om.valueToTree(this.getKubernetesApiAccess()));
}
if (this.getKubernetesNetworkConfig() != null) {
data.set(\\"kubernetesNetworkConfig\\", om.valueToTree(this.getKubernetesNetworkConfig()));
}
if (this.getLambdaRoleName() != null) {
data.set(\\"lambdaRoleName\\", om.valueToTree(this.getLambdaRoleName()));
}
if (this.getName() != null) {
data.set(\\"name\\", om.valueToTree(this.getName()));
}
if (this.getTags() != null) {
data.set(\\"tags\\", om.valueToTree(this.getTags()));
}
if (this.getVersion() != null) {
data.set(\\"version\\", om.valueToTree(this.getVersion()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterProps\\"));
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;
CfnClusterProps.Jsii$Proxy that = (CfnClusterProps.Jsii$Proxy) o;
if (!resourcesVpcConfig.equals(that.resourcesVpcConfig)) return false;
if (!roleArn.equals(that.roleArn)) return false;
if (this.enabledClusterLoggingTypes != null ? !this.enabledClusterLoggingTypes.equals(that.enabledClusterLoggingTypes) : that.enabledClusterLoggingTypes != null) return false;
if (this.encryptionConfig != null ? !this.encryptionConfig.equals(that.encryptionConfig) : that.encryptionConfig != null) return false;
if (this.kubernetesApiAccess != null ? !this.kubernetesApiAccess.equals(that.kubernetesApiAccess) : that.kubernetesApiAccess != null) return false;
if (this.kubernetesNetworkConfig != null ? !this.kubernetesNetworkConfig.equals(that.kubernetesNetworkConfig) : that.kubernetesNetworkConfig != null) return false;
if (this.lambdaRoleName != null ? !this.lambdaRoleName.equals(that.lambdaRoleName) : that.lambdaRoleName != null) return false;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
if (this.tags != null ? !this.tags.equals(that.tags) : that.tags != null) return false;
return this.version != null ? this.version.equals(that.version) : that.version == null;
}
@Override
public final int hashCode() {
int result = this.resourcesVpcConfig.hashCode();
result = 31 * result + (this.roleArn.hashCode());
result = 31 * result + (this.enabledClusterLoggingTypes != null ? this.enabledClusterLoggingTypes.hashCode() : 0);
result = 31 * result + (this.encryptionConfig != null ? this.encryptionConfig.hashCode() : 0);
result = 31 * result + (this.kubernetesApiAccess != null ? this.kubernetesApiAccess.hashCode() : 0);
result = 31 * result + (this.kubernetesNetworkConfig != null ? this.kubernetesNetworkConfig.hashCode() : 0);
result = 31 * result + (this.lambdaRoleName != null ? this.lambdaRoleName.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
result = 31 * result + (this.version != null ? this.version.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/CfnClusterPropsKubernetesApiAccess.java" => "package com.my.module;
/**
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesApiAccess\\")
@software.amazon.jsii.Jsii.Proxy(CfnClusterPropsKubernetesApiAccess.Jsii$Proxy.class)
public interface CfnClusterPropsKubernetesApiAccess extends software.amazon.jsii.JsiiSerializable {
/**
*/
default @org.jetbrains.annotations.Nullable java.util.List getRoles() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.util.List getUsers() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnClusterPropsKubernetesApiAccess}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnClusterPropsKubernetesApiAccess}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List roles;
java.util.List users;
/**
* Sets the value of {@link CfnClusterPropsKubernetesApiAccess#getRoles}
* @param roles the value to be set.
* @return {@code this}
*/
@SuppressWarnings(\\"unchecked\\")
public Builder roles(java.util.List extends com.my.module.KubernetesApiAccessEntry> roles) {
this.roles = (java.util.List)roles;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsKubernetesApiAccess#getUsers}
* @param users the value to be set.
* @return {@code this}
*/
@SuppressWarnings(\\"unchecked\\")
public Builder users(java.util.List extends com.my.module.KubernetesApiAccessEntry> users) {
this.users = (java.util.List)users;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnClusterPropsKubernetesApiAccess}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CfnClusterPropsKubernetesApiAccess build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnClusterPropsKubernetesApiAccess}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnClusterPropsKubernetesApiAccess {
private final java.util.List roles;
private final java.util.List users;
/**
* 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.roles = software.amazon.jsii.Kernel.get(this, \\"roles\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.my.module.KubernetesApiAccessEntry.class)));
this.users = software.amazon.jsii.Kernel.get(this, \\"users\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.my.module.KubernetesApiAccessEntry.class)));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings(\\"unchecked\\")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.roles = (java.util.List)builder.roles;
this.users = (java.util.List)builder.users;
}
@Override
public final java.util.List getRoles() {
return this.roles;
}
@Override
public final java.util.List getUsers() {
return this.users;
}
@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();
if (this.getRoles() != null) {
data.set(\\"roles\\", om.valueToTree(this.getRoles()));
}
if (this.getUsers() != null) {
data.set(\\"users\\", om.valueToTree(this.getUsers()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesApiAccess\\"));
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;
CfnClusterPropsKubernetesApiAccess.Jsii$Proxy that = (CfnClusterPropsKubernetesApiAccess.Jsii$Proxy) o;
if (this.roles != null ? !this.roles.equals(that.roles) : that.roles != null) return false;
return this.users != null ? this.users.equals(that.users) : that.users == null;
}
@Override
public final int hashCode() {
int result = this.roles != null ? this.roles.hashCode() : 0;
result = 31 * result + (this.users != null ? this.users.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/CfnClusterPropsKubernetesNetworkConfig.java" => "package com.my.module;
/**
* Network configuration for Amazon EKS cluster.
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesNetworkConfig\\")
@software.amazon.jsii.Jsii.Proxy(CfnClusterPropsKubernetesNetworkConfig.Jsii$Proxy.class)
public interface CfnClusterPropsKubernetesNetworkConfig extends software.amazon.jsii.JsiiSerializable {
/**
* Specify the range from which cluster services will receive IPv4 addresses.
*/
default @org.jetbrains.annotations.Nullable java.lang.String getServiceIpv4Cidr() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnClusterPropsKubernetesNetworkConfig}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnClusterPropsKubernetesNetworkConfig}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String serviceIpv4Cidr;
/**
* Sets the value of {@link CfnClusterPropsKubernetesNetworkConfig#getServiceIpv4Cidr}
* @param serviceIpv4Cidr Specify the range from which cluster services will receive IPv4 addresses.
* @return {@code this}
*/
public Builder serviceIpv4Cidr(java.lang.String serviceIpv4Cidr) {
this.serviceIpv4Cidr = serviceIpv4Cidr;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnClusterPropsKubernetesNetworkConfig}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CfnClusterPropsKubernetesNetworkConfig build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnClusterPropsKubernetesNetworkConfig}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnClusterPropsKubernetesNetworkConfig {
private final java.lang.String serviceIpv4Cidr;
/**
* 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.serviceIpv4Cidr = software.amazon.jsii.Kernel.get(this, \\"serviceIpv4Cidr\\", 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.serviceIpv4Cidr = builder.serviceIpv4Cidr;
}
@Override
public final java.lang.String getServiceIpv4Cidr() {
return this.serviceIpv4Cidr;
}
@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();
if (this.getServiceIpv4Cidr() != null) {
data.set(\\"serviceIpv4Cidr\\", om.valueToTree(this.getServiceIpv4Cidr()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesNetworkConfig\\"));
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;
CfnClusterPropsKubernetesNetworkConfig.Jsii$Proxy that = (CfnClusterPropsKubernetesNetworkConfig.Jsii$Proxy) o;
return this.serviceIpv4Cidr != null ? this.serviceIpv4Cidr.equals(that.serviceIpv4Cidr) : that.serviceIpv4Cidr == null;
}
@Override
public final int hashCode() {
int result = this.serviceIpv4Cidr != null ? this.serviceIpv4Cidr.hashCode() : 0;
return result;
}
}
}
",
"src/main/java/com/my/module/CfnClusterPropsResourcesVpcConfig.java" => "package com.my.module;
/**
* An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsResourcesVpcConfig\\")
@software.amazon.jsii.Jsii.Proxy(CfnClusterPropsResourcesVpcConfig.Jsii$Proxy.class)
public interface CfnClusterPropsResourcesVpcConfig extends software.amazon.jsii.JsiiSerializable {
/**
* Specify subnets for your Amazon EKS worker nodes.
*
* Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.
*/
@org.jetbrains.annotations.NotNull java.util.List getSubnetIds();
/**
* Set this value to true to enable private access for your cluster's Kubernetes API server endpoint.
*
* If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false , which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods.
*/
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEndpointPrivateAccess() {
return null;
}
/**
* Set this value to false to disable public access to your cluster's Kubernetes API server endpoint.
*
* If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true , which enables public access for your Kubernetes API server.
*/
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEndpointPublicAccess() {
return null;
}
/**
* The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint.
*
* Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.
*/
default @org.jetbrains.annotations.Nullable java.util.List getPublicAccessCidrs() {
return null;
}
/**
* Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane.
*
* If you don't specify a security group, the default security group for your VPC is used.
*/
default @org.jetbrains.annotations.Nullable java.util.List getSecurityGroupIds() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnClusterPropsResourcesVpcConfig}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnClusterPropsResourcesVpcConfig}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List subnetIds;
java.lang.Boolean endpointPrivateAccess;
java.lang.Boolean endpointPublicAccess;
java.util.List publicAccessCidrs;
java.util.List securityGroupIds;
/**
* Sets the value of {@link CfnClusterPropsResourcesVpcConfig#getSubnetIds}
* @param subnetIds Specify subnets for your Amazon EKS worker nodes. This parameter is required.
* Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.
* @return {@code this}
*/
public Builder subnetIds(java.util.List subnetIds) {
this.subnetIds = subnetIds;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsResourcesVpcConfig#getEndpointPrivateAccess}
* @param endpointPrivateAccess Set this value to true to enable private access for your cluster's Kubernetes API server endpoint.
* If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false , which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods.
* @return {@code this}
*/
public Builder endpointPrivateAccess(java.lang.Boolean endpointPrivateAccess) {
this.endpointPrivateAccess = endpointPrivateAccess;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsResourcesVpcConfig#getEndpointPublicAccess}
* @param endpointPublicAccess Set this value to false to disable public access to your cluster's Kubernetes API server endpoint.
* If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true , which enables public access for your Kubernetes API server.
* @return {@code this}
*/
public Builder endpointPublicAccess(java.lang.Boolean endpointPublicAccess) {
this.endpointPublicAccess = endpointPublicAccess;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsResourcesVpcConfig#getPublicAccessCidrs}
* @param publicAccessCidrs The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint.
* Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.
* @return {@code this}
*/
public Builder publicAccessCidrs(java.util.List publicAccessCidrs) {
this.publicAccessCidrs = publicAccessCidrs;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsResourcesVpcConfig#getSecurityGroupIds}
* @param securityGroupIds Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane.
* If you don't specify a security group, the default security group for your VPC is used.
* @return {@code this}
*/
public Builder securityGroupIds(java.util.List securityGroupIds) {
this.securityGroupIds = securityGroupIds;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnClusterPropsResourcesVpcConfig}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CfnClusterPropsResourcesVpcConfig build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnClusterPropsResourcesVpcConfig}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnClusterPropsResourcesVpcConfig {
private final java.util.List subnetIds;
private final java.lang.Boolean endpointPrivateAccess;
private final java.lang.Boolean endpointPublicAccess;
private final java.util.List publicAccessCidrs;
private final java.util.List securityGroupIds;
/**
* 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.subnetIds = software.amazon.jsii.Kernel.get(this, \\"subnetIds\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.endpointPrivateAccess = software.amazon.jsii.Kernel.get(this, \\"endpointPrivateAccess\\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.endpointPublicAccess = software.amazon.jsii.Kernel.get(this, \\"endpointPublicAccess\\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.publicAccessCidrs = software.amazon.jsii.Kernel.get(this, \\"publicAccessCidrs\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.securityGroupIds = software.amazon.jsii.Kernel.get(this, \\"securityGroupIds\\", software.amazon.jsii.NativeType.listOf(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.subnetIds = java.util.Objects.requireNonNull(builder.subnetIds, \\"subnetIds is required\\");
this.endpointPrivateAccess = builder.endpointPrivateAccess;
this.endpointPublicAccess = builder.endpointPublicAccess;
this.publicAccessCidrs = builder.publicAccessCidrs;
this.securityGroupIds = builder.securityGroupIds;
}
@Override
public final java.util.List getSubnetIds() {
return this.subnetIds;
}
@Override
public final java.lang.Boolean getEndpointPrivateAccess() {
return this.endpointPrivateAccess;
}
@Override
public final java.lang.Boolean getEndpointPublicAccess() {
return this.endpointPublicAccess;
}
@Override
public final java.util.List getPublicAccessCidrs() {
return this.publicAccessCidrs;
}
@Override
public final java.util.List getSecurityGroupIds() {
return this.securityGroupIds;
}
@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(\\"subnetIds\\", om.valueToTree(this.getSubnetIds()));
if (this.getEndpointPrivateAccess() != null) {
data.set(\\"endpointPrivateAccess\\", om.valueToTree(this.getEndpointPrivateAccess()));
}
if (this.getEndpointPublicAccess() != null) {
data.set(\\"endpointPublicAccess\\", om.valueToTree(this.getEndpointPublicAccess()));
}
if (this.getPublicAccessCidrs() != null) {
data.set(\\"publicAccessCidrs\\", om.valueToTree(this.getPublicAccessCidrs()));
}
if (this.getSecurityGroupIds() != null) {
data.set(\\"securityGroupIds\\", om.valueToTree(this.getSecurityGroupIds()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsResourcesVpcConfig\\"));
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;
CfnClusterPropsResourcesVpcConfig.Jsii$Proxy that = (CfnClusterPropsResourcesVpcConfig.Jsii$Proxy) o;
if (!subnetIds.equals(that.subnetIds)) return false;
if (this.endpointPrivateAccess != null ? !this.endpointPrivateAccess.equals(that.endpointPrivateAccess) : that.endpointPrivateAccess != null) return false;
if (this.endpointPublicAccess != null ? !this.endpointPublicAccess.equals(that.endpointPublicAccess) : that.endpointPublicAccess != null) return false;
if (this.publicAccessCidrs != null ? !this.publicAccessCidrs.equals(that.publicAccessCidrs) : that.publicAccessCidrs != null) return false;
return this.securityGroupIds != null ? this.securityGroupIds.equals(that.securityGroupIds) : that.securityGroupIds == null;
}
@Override
public final int hashCode() {
int result = this.subnetIds.hashCode();
result = 31 * result + (this.endpointPrivateAccess != null ? this.endpointPrivateAccess.hashCode() : 0);
result = 31 * result + (this.endpointPublicAccess != null ? this.endpointPublicAccess.hashCode() : 0);
result = 31 * result + (this.publicAccessCidrs != null ? this.publicAccessCidrs.hashCode() : 0);
result = 31 * result + (this.securityGroupIds != null ? this.securityGroupIds.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/CfnClusterPropsTags.java" => "package com.my.module;
/**
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsTags\\")
@software.amazon.jsii.Jsii.Proxy(CfnClusterPropsTags.Jsii$Proxy.class)
public interface CfnClusterPropsTags extends software.amazon.jsii.JsiiSerializable {
/**
*/
@org.jetbrains.annotations.NotNull java.lang.String getKey();
/**
*/
@org.jetbrains.annotations.NotNull java.lang.String getValue();
/**
* @return a {@link Builder} of {@link CfnClusterPropsTags}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnClusterPropsTags}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String key;
java.lang.String value;
/**
* Sets the value of {@link CfnClusterPropsTags#getKey}
* @param key the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder key(java.lang.String key) {
this.key = key;
return this;
}
/**
* Sets the value of {@link CfnClusterPropsTags#getValue}
* @param value the value to be set. This parameter is required.
* @return {@code this}
*/
public Builder value(java.lang.String value) {
this.value = value;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnClusterPropsTags}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public CfnClusterPropsTags build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnClusterPropsTags}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnClusterPropsTags {
private final java.lang.String key;
private final java.lang.String value;
/**
* 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.key = software.amazon.jsii.Kernel.get(this, \\"key\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.value = software.amazon.jsii.Kernel.get(this, \\"value\\", 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.key = java.util.Objects.requireNonNull(builder.key, \\"key is required\\");
this.value = java.util.Objects.requireNonNull(builder.value, \\"value is required\\");
}
@Override
public final java.lang.String getKey() {
return this.key;
}
@Override
public final java.lang.String getValue() {
return this.value;
}
@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(\\"key\\", om.valueToTree(this.getKey()));
data.set(\\"value\\", om.valueToTree(this.getValue()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsTags\\"));
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;
CfnClusterPropsTags.Jsii$Proxy that = (CfnClusterPropsTags.Jsii$Proxy) o;
if (!key.equals(that.key)) return false;
return this.value.equals(that.value);
}
@Override
public final int hashCode() {
int result = this.key.hashCode();
result = 31 * result + (this.value.hashCode());
return result;
}
}
}
",
"src/main/java/com/my/module/EncryptionConfigEntry.java" => "package com.my.module;
/**
* The encryption configuration for the cluster.
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.EncryptionConfigEntry\\")
@software.amazon.jsii.Jsii.Proxy(EncryptionConfigEntry.Jsii$Proxy.class)
public interface EncryptionConfigEntry extends software.amazon.jsii.JsiiSerializable {
/**
*/
default @org.jetbrains.annotations.Nullable com.my.module.Provider getProvider() {
return null;
}
/**
* Specifies the resources to be encrypted.
*
* The only supported value is \\"secrets\\".
*/
default @org.jetbrains.annotations.Nullable java.util.List getResources() {
return null;
}
/**
* @return a {@link Builder} of {@link EncryptionConfigEntry}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link EncryptionConfigEntry}
*/
public static final class Builder implements software.amazon.jsii.Builder {
com.my.module.Provider provider;
java.util.List resources;
/**
* Sets the value of {@link EncryptionConfigEntry#getProvider}
* @param provider the value to be set.
* @return {@code this}
*/
public Builder provider(com.my.module.Provider provider) {
this.provider = provider;
return this;
}
/**
* Sets the value of {@link EncryptionConfigEntry#getResources}
* @param resources Specifies the resources to be encrypted.
* The only supported value is \\"secrets\\".
* @return {@code this}
*/
public Builder resources(java.util.List resources) {
this.resources = resources;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link EncryptionConfigEntry}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public EncryptionConfigEntry build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link EncryptionConfigEntry}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements EncryptionConfigEntry {
private final com.my.module.Provider provider;
private final java.util.List resources;
/**
* 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.provider = software.amazon.jsii.Kernel.get(this, \\"provider\\", software.amazon.jsii.NativeType.forClass(com.my.module.Provider.class));
this.resources = software.amazon.jsii.Kernel.get(this, \\"resources\\", software.amazon.jsii.NativeType.listOf(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.provider = builder.provider;
this.resources = builder.resources;
}
@Override
public final com.my.module.Provider getProvider() {
return this.provider;
}
@Override
public final java.util.List getResources() {
return this.resources;
}
@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();
if (this.getProvider() != null) {
data.set(\\"provider\\", om.valueToTree(this.getProvider()));
}
if (this.getResources() != null) {
data.set(\\"resources\\", om.valueToTree(this.getResources()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.EncryptionConfigEntry\\"));
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;
EncryptionConfigEntry.Jsii$Proxy that = (EncryptionConfigEntry.Jsii$Proxy) o;
if (this.provider != null ? !this.provider.equals(that.provider) : that.provider != null) return false;
return this.resources != null ? this.resources.equals(that.resources) : that.resources == null;
}
@Override
public final int hashCode() {
int result = this.provider != null ? this.provider.hashCode() : 0;
result = 31 * result + (this.resources != null ? this.resources.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/KubernetesApiAccessEntry.java" => "package com.my.module;
/**
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.KubernetesApiAccessEntry\\")
@software.amazon.jsii.Jsii.Proxy(KubernetesApiAccessEntry.Jsii$Proxy.class)
public interface KubernetesApiAccessEntry extends software.amazon.jsii.JsiiSerializable {
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.String getArn() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.util.List getGroups() {
return null;
}
/**
*/
default @org.jetbrains.annotations.Nullable java.lang.String getUsername() {
return null;
}
/**
* @return a {@link Builder} of {@link KubernetesApiAccessEntry}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link KubernetesApiAccessEntry}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String arn;
java.util.List groups;
java.lang.String username;
/**
* Sets the value of {@link KubernetesApiAccessEntry#getArn}
* @param arn the value to be set.
* @return {@code this}
*/
public Builder arn(java.lang.String arn) {
this.arn = arn;
return this;
}
/**
* Sets the value of {@link KubernetesApiAccessEntry#getGroups}
* @param groups the value to be set.
* @return {@code this}
*/
public Builder groups(java.util.List groups) {
this.groups = groups;
return this;
}
/**
* Sets the value of {@link KubernetesApiAccessEntry#getUsername}
* @param username the value to be set.
* @return {@code this}
*/
public Builder username(java.lang.String username) {
this.username = username;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link KubernetesApiAccessEntry}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public KubernetesApiAccessEntry build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link KubernetesApiAccessEntry}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements KubernetesApiAccessEntry {
private final java.lang.String arn;
private final java.util.List groups;
private final java.lang.String username;
/**
* 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.arn = software.amazon.jsii.Kernel.get(this, \\"arn\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.groups = software.amazon.jsii.Kernel.get(this, \\"groups\\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.username = software.amazon.jsii.Kernel.get(this, \\"username\\", 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.arn = builder.arn;
this.groups = builder.groups;
this.username = builder.username;
}
@Override
public final java.lang.String getArn() {
return this.arn;
}
@Override
public final java.util.List getGroups() {
return this.groups;
}
@Override
public final java.lang.String getUsername() {
return this.username;
}
@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();
if (this.getArn() != null) {
data.set(\\"arn\\", om.valueToTree(this.getArn()));
}
if (this.getGroups() != null) {
data.set(\\"groups\\", om.valueToTree(this.getGroups()));
}
if (this.getUsername() != null) {
data.set(\\"username\\", om.valueToTree(this.getUsername()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.KubernetesApiAccessEntry\\"));
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;
KubernetesApiAccessEntry.Jsii$Proxy that = (KubernetesApiAccessEntry.Jsii$Proxy) o;
if (this.arn != null ? !this.arn.equals(that.arn) : that.arn != null) return false;
if (this.groups != null ? !this.groups.equals(that.groups) : that.groups != null) return false;
return this.username != null ? this.username.equals(that.username) : that.username == null;
}
@Override
public final int hashCode() {
int result = this.arn != null ? this.arn.hashCode() : 0;
result = 31 * result + (this.groups != null ? this.groups.hashCode() : 0);
result = 31 * result + (this.username != null ? this.username.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/Provider.java" => "package com.my.module;
/**
* AWS Key Management Service (AWS KMS) customer master key (CMK).
*
* Either the ARN or the alias can be used.
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Provider\\")
@software.amazon.jsii.Jsii.Proxy(Provider.Jsii$Proxy.class)
public interface Provider extends software.amazon.jsii.JsiiSerializable {
/**
* Amazon Resource Name (ARN) or alias of the customer master key (CMK).
*
* The CMK must be symmetric, created in the same region as the cluster, and if the CMK was created in a different account, the user must have access to the CMK.
*/
default @org.jetbrains.annotations.Nullable java.lang.String getKeyArn() {
return null;
}
/**
* @return a {@link Builder} of {@link Provider}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link Provider}
*/
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String keyArn;
/**
* Sets the value of {@link Provider#getKeyArn}
* @param keyArn Amazon Resource Name (ARN) or alias of the customer master key (CMK).
* The CMK must be symmetric, created in the same region as the cluster, and if the CMK was created in a different account, the user must have access to the CMK.
* @return {@code this}
*/
public Builder keyArn(java.lang.String keyArn) {
this.keyArn = keyArn;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link Provider}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public Provider build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link Provider}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Provider {
private final java.lang.String keyArn;
/**
* 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.keyArn = software.amazon.jsii.Kernel.get(this, \\"keyArn\\", 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.keyArn = builder.keyArn;
}
@Override
public final java.lang.String getKeyArn() {
return this.keyArn;
}
@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();
if (this.getKeyArn() != null) {
data.set(\\"keyArn\\", om.valueToTree(this.getKeyArn()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Provider\\"));
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;
Provider.Jsii$Proxy that = (Provider.Jsii$Proxy) o;
return this.keyArn != null ? this.keyArn.equals(that.keyArn) : that.keyArn == null;
}
@Override
public final int hashCode() {
int result = this.keyArn != null ? this.keyArn.hashCode() : 0;
return result;
}
}
}
",
"src/main/resources/com/my/module/$Module.txt" => "1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnCluster=com.my.module.CfnCluster
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterProps=com.my.module.CfnClusterProps
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesApiAccess=com.my.module.CfnClusterPropsKubernetesApiAccess
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesNetworkConfig=com.my.module.CfnClusterPropsKubernetesNetworkConfig
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsResourcesVpcConfig=com.my.module.CfnClusterPropsResourcesVpcConfig
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsTags=com.my.module.CfnClusterPropsTags
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.EncryptionConfigEntry=com.my.module.EncryptionConfigEntry
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.KubernetesApiAccessEntry=com.my.module.KubernetesApiAccessEntry
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Provider=com.my.module.Provider
",
}
`;
exports[`java 2`] = `
Map {
"src/main/java/com/my/module/$Module.java" => "package com.my.module;
import static java.util.Arrays.asList;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import software.amazon.jsii.JsiiModule;
@software.amazon.jsii.Internal
public final class $Module extends JsiiModule {
private static final Map MODULE_TYPES = load();
private static Map load() {
final Map result = new HashMap<>();
final ClassLoader cl = $Module.class.getClassLoader();
try (final InputStream is = cl.getResourceAsStream(\\"com/my/module/$Module.txt\\");
final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8);
final BufferedReader br = new BufferedReader(rd)) {
br.lines()
.filter(line -> !line.trim().isEmpty())
.forEach(line -> {
final String[] parts = line.split(\\"=\\", 2);
final String fqn = parts[0];
final String className = parts[1];
result.put(fqn, className);
});
}
catch (final IOException exception) {
throw new UncheckedIOException(exception);
}
return result;
}
private final Map> cache = new HashMap<>();
public $Module() {
super(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6\\", \\"0.0.0\\", $Module.class, \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6@0.0.0.jsii.tgz\\");
}
@Override
public List> getDependencies() {
return asList(software.amazon.awscdk.cdk.asset.awscli.v1.$Module.class, software.amazon.awscdk.cdk.asset.kubectl.v20.$Module.class, software.amazon.awscdk.cdk.asset.node.proxy.agent.v5.$Module.class, software.amazon.awscdk.$Module.class, software.constructs.$Module.class);
}
@Override
protected Class> resolveClass(final String fqn) throws ClassNotFoundException {
if (!MODULE_TYPES.containsKey(fqn)) {
throw new ClassNotFoundException(\\"Unknown JSII type: \\" + fqn);
}
String className = MODULE_TYPES.get(fqn);
if (!this.cache.containsKey(className)) {
this.cache.put(className, this.findClass(className));
}
return this.cache.get(className);
}
private Class> findClass(final String binaryName) {
try {
return Class.forName(binaryName);
}
catch (final ClassNotFoundException exception) {
throw new RuntimeException(exception);
}
}
}
",
"src/main/java/com/my/module/Ec2ComputeInstance.java" => "package com.my.module;
/**
* Ec2ComputeInstance.
*
* Compute instance to be used for experiments, does NOT contain DB access
*
* Owner: IT
*/
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance\\")
public class Ec2ComputeInstance extends software.amazon.awscdk.Resource implements com.my.module.IEc2ComputeInstance {
protected Ec2ComputeInstance(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Ec2ComputeInstance(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* Create a new Service Catalog \`Ec2ComputeInstance\` product.
*
* @param scope
- scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
* @param props This parameter is required.
*/
public Ec2ComputeInstance(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.my.module.Ec2ComputeInstanceProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, \\"scope is required\\"), java.util.Objects.requireNonNull(id, \\"id is required\\"), java.util.Objects.requireNonNull(props, \\"props is required\\") });
}
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getCloudFormationStackArn() {
return software.amazon.jsii.Kernel.get(this, \\"cloudFormationStackArn\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The command to download the key.
*/
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getDownloadKeyCommand() {
return software.amazon.jsii.Kernel.get(this, \\"downloadKeyCommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getIPAddress() {
return software.amazon.jsii.Kernel.get(this, \\"iPAddress\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getProvisionedProductId() {
return software.amazon.jsii.Kernel.get(this, \\"provisionedProductId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getRecordId() {
return software.amazon.jsii.Kernel.get(this, \\"recordId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public @org.jetbrains.annotations.NotNull java.lang.String getSshcommand() {
return software.amazon.jsii.Kernel.get(this, \\"sshcommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.InstanceType\\")
public enum InstanceType {
/**
* t2.micro.
*/
T2_MICRO,
/**
* t2.small.
*/
T2_SMALL,
}
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.Numbers\\")
public enum Numbers {
/**
*
*/
VALUE_1,
/**
*
*/
VALUE_2,
/**
*
*/
VALUE_3,
/**
*
*/
VALUE_4,
/**
*
*/
VALUE_5,
}
/**
* A fluent builder for {@link com.my.module.Ec2ComputeInstance}.
*/
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
*/
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final com.my.module.Ec2ComputeInstanceProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new com.my.module.Ec2ComputeInstanceProps.Builder();
}
/**
* InstanceType.
*
* The instance type of an EC2 instance.
*
* Must be t2 micro or small.
*
* Default: t2.micro
*
* @return {@code this}
* @param instanceType InstanceType. This parameter is required.
*/
public Builder instanceType(final com.my.module.Ec2ComputeInstance.InstanceType instanceType) {
this.props.instanceType(instanceType);
return this;
}
/**
* Numbers.
*
* A number to be selected.
*
* These are the allowed numbers.
*
* Default: 5
*
* @return {@code this}
* @param numbers Numbers. This parameter is required.
*/
public Builder numbers(final com.my.module.Ec2ComputeInstance.Numbers numbers) {
this.props.numbers(numbers);
return this;
}
/**
* SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter.
*
* Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
*
* @return {@code this}
* @param ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter. This parameter is required.
*/
public Builder ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter(final java.lang.String ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter) {
this.props.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter(ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter);
return this;
}
/**
* @return a newly built instance of {@link com.my.module.Ec2ComputeInstance}.
*/
@Override
public com.my.module.Ec2ComputeInstance build() {
return new com.my.module.Ec2ComputeInstance(
this.scope,
this.id,
this.props.build()
);
}
}
}
",
"src/main/java/com/my/module/Ec2ComputeInstanceProps.java" => "package com.my.module;
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstanceProps\\")
@software.amazon.jsii.Jsii.Proxy(Ec2ComputeInstanceProps.Jsii$Proxy.class)
public interface Ec2ComputeInstanceProps extends software.amazon.jsii.JsiiSerializable {
/**
* InstanceType.
*
* The instance type of an EC2 instance.
*
* Must be t2 micro or small.
*
* Default: t2.micro
*/
default @org.jetbrains.annotations.Nullable com.my.module.Ec2ComputeInstance.InstanceType getInstanceType() {
return null;
}
/**
* Numbers.
*
* A number to be selected.
*
* These are the allowed numbers.
*
* Default: 5
*/
default @org.jetbrains.annotations.Nullable com.my.module.Ec2ComputeInstance.Numbers getNumbers() {
return null;
}
/**
* SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter.
*
* Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
*/
default @org.jetbrains.annotations.Nullable java.lang.String getSsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter() {
return null;
}
/**
* @return a {@link Builder} of {@link Ec2ComputeInstanceProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link Ec2ComputeInstanceProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
com.my.module.Ec2ComputeInstance.InstanceType instanceType;
com.my.module.Ec2ComputeInstance.Numbers numbers;
java.lang.String ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter;
/**
* Sets the value of {@link Ec2ComputeInstanceProps#getInstanceType}
* @param instanceType InstanceType.
* The instance type of an EC2 instance.
*
* Must be t2 micro or small.
* @return {@code this}
*/
public Builder instanceType(com.my.module.Ec2ComputeInstance.InstanceType instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link Ec2ComputeInstanceProps#getNumbers}
* @param numbers Numbers.
* A number to be selected.
*
* These are the allowed numbers.
* @return {@code this}
*/
public Builder numbers(com.my.module.Ec2ComputeInstance.Numbers numbers) {
this.numbers = numbers;
return this;
}
/**
* Sets the value of {@link Ec2ComputeInstanceProps#getSsmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter}
* @param ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter.
* @return {@code this}
*/
public Builder ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter(java.lang.String ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter) {
this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter = ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link Ec2ComputeInstanceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public Ec2ComputeInstanceProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link Ec2ComputeInstanceProps}
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Ec2ComputeInstanceProps {
private final com.my.module.Ec2ComputeInstance.InstanceType instanceType;
private final com.my.module.Ec2ComputeInstance.Numbers numbers;
private final java.lang.String ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter;
/**
* 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.instanceType = software.amazon.jsii.Kernel.get(this, \\"instanceType\\", software.amazon.jsii.NativeType.forClass(com.my.module.Ec2ComputeInstance.InstanceType.class));
this.numbers = software.amazon.jsii.Kernel.get(this, \\"numbers\\", software.amazon.jsii.NativeType.forClass(com.my.module.Ec2ComputeInstance.Numbers.class));
this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter = software.amazon.jsii.Kernel.get(this, \\"ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter\\", 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.instanceType = builder.instanceType;
this.numbers = builder.numbers;
this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter = builder.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter;
}
@Override
public final com.my.module.Ec2ComputeInstance.InstanceType getInstanceType() {
return this.instanceType;
}
@Override
public final com.my.module.Ec2ComputeInstance.Numbers getNumbers() {
return this.numbers;
}
@Override
public final java.lang.String getSsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter() {
return this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter;
}
@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();
if (this.getInstanceType() != null) {
data.set(\\"instanceType\\", om.valueToTree(this.getInstanceType()));
}
if (this.getNumbers() != null) {
data.set(\\"numbers\\", om.valueToTree(this.getNumbers()));
}
if (this.getSsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter() != null) {
data.set(\\"ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter\\", om.valueToTree(this.getSsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set(\\"fqn\\", om.valueToTree(\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstanceProps\\"));
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;
Ec2ComputeInstanceProps.Jsii$Proxy that = (Ec2ComputeInstanceProps.Jsii$Proxy) o;
if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
if (this.numbers != null ? !this.numbers.equals(that.numbers) : that.numbers != null) return false;
return this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter != null ? this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter.equals(that.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter) : that.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter == null;
}
@Override
public final int hashCode() {
int result = this.instanceType != null ? this.instanceType.hashCode() : 0;
result = 31 * result + (this.numbers != null ? this.numbers.hashCode() : 0);
result = 31 * result + (this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter != null ? this.ssmParameterValueawsserviceamiamazonlinuxlatestamzn2Amihvmarm64Gp2C96584B6F00A464Ead1953Aff4B05118Parameter.hashCode() : 0);
return result;
}
}
}
",
"src/main/java/com/my/module/IEc2ComputeInstance.java" => "package com.my.module;
@software.amazon.jsii.Jsii(module = com.my.module.$Module.class, fqn = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.IEc2ComputeInstance\\")
@software.amazon.jsii.Jsii.Proxy(IEc2ComputeInstance.Jsii$Proxy.class)
public interface IEc2ComputeInstance extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.IResource {
@org.jetbrains.annotations.NotNull java.lang.String getCloudFormationStackArn();
@org.jetbrains.annotations.NotNull java.lang.String getDownloadKeyCommand();
@org.jetbrains.annotations.NotNull java.lang.String getIPAddress();
@org.jetbrains.annotations.NotNull java.lang.String getProvisionedProductId();
@org.jetbrains.annotations.NotNull java.lang.String getRecordId();
@org.jetbrains.annotations.NotNull java.lang.String getSshcommand();
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements com.my.module.IEc2ComputeInstance.Jsii$Default {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* The tree node.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.constructs.Node getNode() {
return software.amazon.jsii.Kernel.get(this, \\"node\\", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class));
}
/**
* The environment this resource belongs to.
*
* For resources that are created and managed by the CDK
* (generally, those created by creating new class instances like Role, Bucket, etc.),
* this is always the same as the environment of the stack they belong to;
* however, for imported resources
* (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
* that might be different than the stack they were imported into.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.ResourceEnvironment getEnv() {
return software.amazon.jsii.Kernel.get(this, \\"env\\", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.ResourceEnvironment.class));
}
/**
* The stack in which this resource is defined.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.Stack getStack() {
return software.amazon.jsii.Kernel.get(this, \\"stack\\", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Stack.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getCloudFormationStackArn() {
return software.amazon.jsii.Kernel.get(this, \\"cloudFormationStackArn\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getDownloadKeyCommand() {
return software.amazon.jsii.Kernel.get(this, \\"downloadKeyCommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getIPAddress() {
return software.amazon.jsii.Kernel.get(this, \\"iPAddress\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getProvisionedProductId() {
return software.amazon.jsii.Kernel.get(this, \\"provisionedProductId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getRecordId() {
return software.amazon.jsii.Kernel.get(this, \\"recordId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
public final @org.jetbrains.annotations.NotNull java.lang.String getSshcommand() {
return software.amazon.jsii.Kernel.get(this, \\"sshcommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Apply the given removal policy to this resource.
*
* The Removal Policy controls what happens to this resource when it stops
* being managed by CloudFormation, either because you've removed it from the
* CDK application or because you've made a change that requires the resource
* to be replaced.
*
* The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
* account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
*
* @param policy This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public final void applyRemovalPolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.RemovalPolicy policy) {
software.amazon.jsii.Kernel.call(this, \\"applyRemovalPolicy\\", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policy, \\"policy is required\\") });
}
}
/**
* Internal default implementation for {@link IEc2ComputeInstance}.
*/
@software.amazon.jsii.Internal
interface Jsii$Default extends IEc2ComputeInstance, software.amazon.awscdk.IResource.Jsii$Default {
/**
* The tree node.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.constructs.Node getNode() {
return software.amazon.jsii.Kernel.get(this, \\"node\\", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class));
}
/**
* The environment this resource belongs to.
*
* For resources that are created and managed by the CDK
* (generally, those created by creating new class instances like Role, Bucket, etc.),
* this is always the same as the environment of the stack they belong to;
* however, for imported resources
* (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
* that might be different than the stack they were imported into.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.ResourceEnvironment getEnv() {
return software.amazon.jsii.Kernel.get(this, \\"env\\", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.ResourceEnvironment.class));
}
/**
* The stack in which this resource is defined.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.NotNull software.amazon.awscdk.Stack getStack() {
return software.amazon.jsii.Kernel.get(this, \\"stack\\", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Stack.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getCloudFormationStackArn() {
return software.amazon.jsii.Kernel.get(this, \\"cloudFormationStackArn\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getDownloadKeyCommand() {
return software.amazon.jsii.Kernel.get(this, \\"downloadKeyCommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getIPAddress() {
return software.amazon.jsii.Kernel.get(this, \\"iPAddress\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getProvisionedProductId() {
return software.amazon.jsii.Kernel.get(this, \\"provisionedProductId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getRecordId() {
return software.amazon.jsii.Kernel.get(this, \\"recordId\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
@Override
default @org.jetbrains.annotations.NotNull java.lang.String getSshcommand() {
return software.amazon.jsii.Kernel.get(this, \\"sshcommand\\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Apply the given removal policy to this resource.
*
* The Removal Policy controls what happens to this resource when it stops
* being managed by CloudFormation, either because you've removed it from the
* CDK application or because you've made a change that requires the resource
* to be replaced.
*
* The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
* account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
*
* @param policy This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
default void applyRemovalPolicy(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.RemovalPolicy policy) {
software.amazon.jsii.Kernel.call(this, \\"applyRemovalPolicy\\", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(policy, \\"policy is required\\") });
}
}
}
",
"src/main/resources/com/my/module/$Module.txt" => "1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance=com.my.module.Ec2ComputeInstance
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.InstanceType=com.my.module.Ec2ComputeInstance$InstanceType
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.Numbers=com.my.module.Ec2ComputeInstance$Numbers
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstanceProps=com.my.module.Ec2ComputeInstanceProps
1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.IEc2ComputeInstance=com.my.module.IEc2ComputeInstance
",
}
`;
exports[`python 1`] = `
Map {
"awsqs_eks_cluster/__init__.py" => "import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
from typeguard import check_type
from ._jsii import *
import aws_cdk as _aws_cdk_ceddda9d
import constructs as _constructs_77d1e7e8
class CfnCluster(
_aws_cdk_ceddda9d.CfnResource,
metaclass=jsii.JSIIMeta,
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnCluster\\",
):
'''A CloudFormation \`\`AWSQS::EKS::Cluster\`\`.
:cloudformationResource: AWSQS::EKS::Cluster
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
def __init__(
self,
scope: _constructs_77d1e7e8.Construct,
id: builtins.str,
*,
resources_vpc_config: typing.Union[\\"CfnClusterPropsResourcesVpcConfig\\", typing.Dict[builtins.str, typing.Any]],
role_arn: builtins.str,
enabled_cluster_logging_types: typing.Optional[typing.Sequence[builtins.str]] = None,
encryption_config: typing.Optional[typing.Sequence[typing.Union[\\"EncryptionConfigEntry\\", typing.Dict[builtins.str, typing.Any]]]] = None,
kubernetes_api_access: typing.Optional[typing.Union[\\"CfnClusterPropsKubernetesApiAccess\\", typing.Dict[builtins.str, typing.Any]]] = None,
kubernetes_network_config: typing.Optional[typing.Union[\\"CfnClusterPropsKubernetesNetworkConfig\\", typing.Dict[builtins.str, typing.Any]]] = None,
lambda_role_name: typing.Optional[builtins.str] = None,
name: typing.Optional[builtins.str] = None,
tags: typing.Optional[typing.Sequence[typing.Union[\\"CfnClusterPropsTags\\", typing.Dict[builtins.str, typing.Any]]]] = None,
version: typing.Optional[builtins.str] = None,
) -> None:
'''Create a new \`\`AWSQS::EKS::Cluster\`\`.
:param scope: - scope in which this resource is defined.
:param id: - scoped id of the resource.
:param resources_vpc_config: An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
:param role_arn: Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This provides permissions for Amazon EKS to call other AWS APIs.
:param enabled_cluster_logging_types: Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs. By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
:param encryption_config: Encryption configuration for the cluster.
:param kubernetes_api_access:
:param kubernetes_network_config: Network configuration for Amazon EKS cluster.
:param lambda_role_name: Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. this provides permissions for Lambda to be invoked and attach to the cluster VPC
:param name: A unique name for your cluster.
:param tags:
:param version: Desired Kubernetes version for your cluster. If you don't specify this value, the cluster uses the latest version from Amazon EKS.
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__bacecc56333714eb669ab7a48888241533b00927d8923c503a672032982224f1)
check_type(argname=\\"argument scope\\", value=scope, expected_type=type_hints[\\"scope\\"])
check_type(argname=\\"argument id\\", value=id, expected_type=type_hints[\\"id\\"])
props = CfnClusterProps(
resources_vpc_config=resources_vpc_config,
role_arn=role_arn,
enabled_cluster_logging_types=enabled_cluster_logging_types,
encryption_config=encryption_config,
kubernetes_api_access=kubernetes_api_access,
kubernetes_network_config=kubernetes_network_config,
lambda_role_name=lambda_role_name,
name=name,
tags=tags,
version=version,
)
jsii.create(self.__class__, self, [scope, id, props])
@jsii.python.classproperty
@jsii.member(jsii_name=\\"CFN_RESOURCE_TYPE_NAME\\")
def CFN_RESOURCE_TYPE_NAME(cls) -> builtins.str:
'''The CloudFormation resource type name for this resource class.'''
return typing.cast(builtins.str, jsii.sget(cls, \\"CFN_RESOURCE_TYPE_NAME\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrArn\\")
def attr_arn(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.Arn\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrArn\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrCertificateAuthorityData\\")
def attr_certificate_authority_data(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.CertificateAuthorityData\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrCertificateAuthorityData\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrClusterSecurityGroupId\\")
def attr_cluster_security_group_id(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.ClusterSecurityGroupId\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrClusterSecurityGroupId\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrEncryptionConfigKeyArn\\")
def attr_encryption_config_key_arn(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.EncryptionConfigKeyArn\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrEncryptionConfigKeyArn\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrEndpoint\\")
def attr_endpoint(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.Endpoint\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrEndpoint\\"))
@builtins.property
@jsii.member(jsii_name=\\"attrOIDCIssuerURL\\")
def attr_oidc_issuer_url(self) -> builtins.str:
'''Attribute \`\`AWSQS::EKS::Cluster.OIDCIssuerURL\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"attrOIDCIssuerURL\\"))
@builtins.property
@jsii.member(jsii_name=\\"kubernetesApiAccess\\")
def kubernetes_api_access(self) -> typing.Any:
'''\`\`AWSQS::EKS::Cluster.KubernetesApiAccess\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Any, jsii.get(self, \\"kubernetesApiAccess\\"))
@builtins.property
@jsii.member(jsii_name=\\"kubernetesNetworkConfig\\")
def kubernetes_network_config(self) -> typing.Any:
'''\`\`AWSQS::EKS::Cluster.KubernetesNetworkConfig\`\` Network configuration for Amazon EKS cluster.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Any, jsii.get(self, \\"kubernetesNetworkConfig\\"))
@builtins.property
@jsii.member(jsii_name=\\"resourcesVpcConfig\\")
def resources_vpc_config(self) -> typing.Any:
'''\`\`AWSQS::EKS::Cluster.ResourcesVpcConfig\`\` An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Any, jsii.get(self, \\"resourcesVpcConfig\\"))
@builtins.property
@jsii.member(jsii_name=\\"roleArn\\")
def role_arn(self) -> builtins.str:
'''\`\`AWSQS::EKS::Cluster.RoleArn\`\` Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This provides permissions for Amazon EKS to call other AWS APIs.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(builtins.str, jsii.get(self, \\"roleArn\\"))
@builtins.property
@jsii.member(jsii_name=\\"enabledClusterLoggingTypes\\")
def enabled_cluster_logging_types(
self,
) -> typing.Optional[typing.List[builtins.str]]:
'''\`\`AWSQS::EKS::Cluster.EnabledClusterLoggingTypes\`\` Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs. By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, \\"enabledClusterLoggingTypes\\"))
@builtins.property
@jsii.member(jsii_name=\\"encryptionConfig\\")
def encryption_config(
self,
) -> typing.Optional[typing.List[\\"EncryptionConfigEntry\\"]]:
'''\`\`AWSQS::EKS::Cluster.EncryptionConfig\`\` Encryption configuration for the cluster.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[typing.List[\\"EncryptionConfigEntry\\"]], jsii.get(self, \\"encryptionConfig\\"))
@builtins.property
@jsii.member(jsii_name=\\"lambdaRoleName\\")
def lambda_role_name(self) -> typing.Optional[builtins.str]:
'''\`\`AWSQS::EKS::Cluster.LambdaRoleName\`\` Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. this provides permissions for Lambda to be invoked and attach to the cluster VPC.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[builtins.str], jsii.get(self, \\"lambdaRoleName\\"))
@builtins.property
@jsii.member(jsii_name=\\"name\\")
def name(self) -> typing.Optional[builtins.str]:
'''\`\`AWSQS::EKS::Cluster.Name\`\` A unique name for your cluster.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[builtins.str], jsii.get(self, \\"name\\"))
@builtins.property
@jsii.member(jsii_name=\\"tags\\")
def tags(self) -> typing.Optional[typing.List[typing.Any]]:
'''\`\`AWSQS::EKS::Cluster.Tags\`\`.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[typing.List[typing.Any]], jsii.get(self, \\"tags\\"))
@builtins.property
@jsii.member(jsii_name=\\"version\\")
def version(self) -> typing.Optional[builtins.str]:
'''\`\`AWSQS::EKS::Cluster.Version\`\` Desired Kubernetes version for your cluster. If you don't specify this value, the cluster uses the latest version from Amazon EKS.
:link: https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
'''
return typing.cast(typing.Optional[builtins.str], jsii.get(self, \\"version\\"))
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterProps\\",
jsii_struct_bases=[],
name_mapping={
\\"resources_vpc_config\\": \\"resourcesVpcConfig\\",
\\"role_arn\\": \\"roleArn\\",
\\"enabled_cluster_logging_types\\": \\"enabledClusterLoggingTypes\\",
\\"encryption_config\\": \\"encryptionConfig\\",
\\"kubernetes_api_access\\": \\"kubernetesApiAccess\\",
\\"kubernetes_network_config\\": \\"kubernetesNetworkConfig\\",
\\"lambda_role_name\\": \\"lambdaRoleName\\",
\\"name\\": \\"name\\",
\\"tags\\": \\"tags\\",
\\"version\\": \\"version\\",
},
)
class CfnClusterProps:
def __init__(
self,
*,
resources_vpc_config: typing.Union[\\"CfnClusterPropsResourcesVpcConfig\\", typing.Dict[builtins.str, typing.Any]],
role_arn: builtins.str,
enabled_cluster_logging_types: typing.Optional[typing.Sequence[builtins.str]] = None,
encryption_config: typing.Optional[typing.Sequence[typing.Union[\\"EncryptionConfigEntry\\", typing.Dict[builtins.str, typing.Any]]]] = None,
kubernetes_api_access: typing.Optional[typing.Union[\\"CfnClusterPropsKubernetesApiAccess\\", typing.Dict[builtins.str, typing.Any]]] = None,
kubernetes_network_config: typing.Optional[typing.Union[\\"CfnClusterPropsKubernetesNetworkConfig\\", typing.Dict[builtins.str, typing.Any]]] = None,
lambda_role_name: typing.Optional[builtins.str] = None,
name: typing.Optional[builtins.str] = None,
tags: typing.Optional[typing.Sequence[typing.Union[\\"CfnClusterPropsTags\\", typing.Dict[builtins.str, typing.Any]]]] = None,
version: typing.Optional[builtins.str] = None,
) -> None:
'''A resource that creates Amazon Elastic Kubernetes Service (Amazon EKS) clusters.
:param resources_vpc_config: An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
:param role_arn: Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This provides permissions for Amazon EKS to call other AWS APIs.
:param enabled_cluster_logging_types: Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs. By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
:param encryption_config: Encryption configuration for the cluster.
:param kubernetes_api_access:
:param kubernetes_network_config: Network configuration for Amazon EKS cluster.
:param lambda_role_name: Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. this provides permissions for Lambda to be invoked and attach to the cluster VPC
:param name: A unique name for your cluster.
:param tags:
:param version: Desired Kubernetes version for your cluster. If you don't specify this value, the cluster uses the latest version from Amazon EKS.
:schema: CfnClusterProps
'''
if isinstance(resources_vpc_config, dict):
resources_vpc_config = CfnClusterPropsResourcesVpcConfig(**resources_vpc_config)
if isinstance(kubernetes_api_access, dict):
kubernetes_api_access = CfnClusterPropsKubernetesApiAccess(**kubernetes_api_access)
if isinstance(kubernetes_network_config, dict):
kubernetes_network_config = CfnClusterPropsKubernetesNetworkConfig(**kubernetes_network_config)
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__5c9825b6539ead7fd67aff9c082b9af5d5f56e8e41f5947f6cb3b6afe672122f)
check_type(argname=\\"argument resources_vpc_config\\", value=resources_vpc_config, expected_type=type_hints[\\"resources_vpc_config\\"])
check_type(argname=\\"argument role_arn\\", value=role_arn, expected_type=type_hints[\\"role_arn\\"])
check_type(argname=\\"argument enabled_cluster_logging_types\\", value=enabled_cluster_logging_types, expected_type=type_hints[\\"enabled_cluster_logging_types\\"])
check_type(argname=\\"argument encryption_config\\", value=encryption_config, expected_type=type_hints[\\"encryption_config\\"])
check_type(argname=\\"argument kubernetes_api_access\\", value=kubernetes_api_access, expected_type=type_hints[\\"kubernetes_api_access\\"])
check_type(argname=\\"argument kubernetes_network_config\\", value=kubernetes_network_config, expected_type=type_hints[\\"kubernetes_network_config\\"])
check_type(argname=\\"argument lambda_role_name\\", value=lambda_role_name, expected_type=type_hints[\\"lambda_role_name\\"])
check_type(argname=\\"argument name\\", value=name, expected_type=type_hints[\\"name\\"])
check_type(argname=\\"argument tags\\", value=tags, expected_type=type_hints[\\"tags\\"])
check_type(argname=\\"argument version\\", value=version, expected_type=type_hints[\\"version\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {
\\"resources_vpc_config\\": resources_vpc_config,
\\"role_arn\\": role_arn,
}
if enabled_cluster_logging_types is not None:
self._values[\\"enabled_cluster_logging_types\\"] = enabled_cluster_logging_types
if encryption_config is not None:
self._values[\\"encryption_config\\"] = encryption_config
if kubernetes_api_access is not None:
self._values[\\"kubernetes_api_access\\"] = kubernetes_api_access
if kubernetes_network_config is not None:
self._values[\\"kubernetes_network_config\\"] = kubernetes_network_config
if lambda_role_name is not None:
self._values[\\"lambda_role_name\\"] = lambda_role_name
if name is not None:
self._values[\\"name\\"] = name
if tags is not None:
self._values[\\"tags\\"] = tags
if version is not None:
self._values[\\"version\\"] = version
@builtins.property
def resources_vpc_config(self) -> \\"CfnClusterPropsResourcesVpcConfig\\":
'''An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
:schema: CfnClusterProps#ResourcesVpcConfig
'''
result = self._values.get(\\"resources_vpc_config\\")
assert result is not None, \\"Required property 'resources_vpc_config' is missing\\"
return typing.cast(\\"CfnClusterPropsResourcesVpcConfig\\", result)
@builtins.property
def role_arn(self) -> builtins.str:
'''Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role.
This provides permissions for Amazon EKS to call other AWS APIs.
:schema: CfnClusterProps#RoleArn
'''
result = self._values.get(\\"role_arn\\")
assert result is not None, \\"Required property 'role_arn' is missing\\"
return typing.cast(builtins.str, result)
@builtins.property
def enabled_cluster_logging_types(
self,
) -> typing.Optional[typing.List[builtins.str]]:
'''Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs.
By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
:schema: CfnClusterProps#EnabledClusterLoggingTypes
'''
result = self._values.get(\\"enabled_cluster_logging_types\\")
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
@builtins.property
def encryption_config(
self,
) -> typing.Optional[typing.List[\\"EncryptionConfigEntry\\"]]:
'''Encryption configuration for the cluster.
:schema: CfnClusterProps#EncryptionConfig
'''
result = self._values.get(\\"encryption_config\\")
return typing.cast(typing.Optional[typing.List[\\"EncryptionConfigEntry\\"]], result)
@builtins.property
def kubernetes_api_access(
self,
) -> typing.Optional[\\"CfnClusterPropsKubernetesApiAccess\\"]:
'''
:schema: CfnClusterProps#KubernetesApiAccess
'''
result = self._values.get(\\"kubernetes_api_access\\")
return typing.cast(typing.Optional[\\"CfnClusterPropsKubernetesApiAccess\\"], result)
@builtins.property
def kubernetes_network_config(
self,
) -> typing.Optional[\\"CfnClusterPropsKubernetesNetworkConfig\\"]:
'''Network configuration for Amazon EKS cluster.
:schema: CfnClusterProps#KubernetesNetworkConfig
'''
result = self._values.get(\\"kubernetes_network_config\\")
return typing.cast(typing.Optional[\\"CfnClusterPropsKubernetesNetworkConfig\\"], result)
@builtins.property
def lambda_role_name(self) -> typing.Optional[builtins.str]:
'''Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled.
this provides permissions for Lambda to be invoked and attach to the cluster VPC
:schema: CfnClusterProps#LambdaRoleName
'''
result = self._values.get(\\"lambda_role_name\\")
return typing.cast(typing.Optional[builtins.str], result)
@builtins.property
def name(self) -> typing.Optional[builtins.str]:
'''A unique name for your cluster.
:schema: CfnClusterProps#Name
'''
result = self._values.get(\\"name\\")
return typing.cast(typing.Optional[builtins.str], result)
@builtins.property
def tags(self) -> typing.Optional[typing.List[\\"CfnClusterPropsTags\\"]]:
'''
:schema: CfnClusterProps#Tags
'''
result = self._values.get(\\"tags\\")
return typing.cast(typing.Optional[typing.List[\\"CfnClusterPropsTags\\"]], result)
@builtins.property
def version(self) -> typing.Optional[builtins.str]:
'''Desired Kubernetes version for your cluster.
If you don't specify this value, the cluster uses the latest version from Amazon EKS.
:schema: CfnClusterProps#Version
'''
result = self._values.get(\\"version\\")
return typing.cast(typing.Optional[builtins.str], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"CfnClusterProps(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesApiAccess\\",
jsii_struct_bases=[],
name_mapping={\\"roles\\": \\"roles\\", \\"users\\": \\"users\\"},
)
class CfnClusterPropsKubernetesApiAccess:
def __init__(
self,
*,
roles: typing.Optional[typing.Sequence[typing.Union[\\"KubernetesApiAccessEntry\\", typing.Dict[builtins.str, typing.Any]]]] = None,
users: typing.Optional[typing.Sequence[typing.Union[\\"KubernetesApiAccessEntry\\", typing.Dict[builtins.str, typing.Any]]]] = None,
) -> None:
'''
:param roles:
:param users:
:schema: CfnClusterPropsKubernetesApiAccess
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__0a50b00c849246852acb04761c601a9c20ed943ed5118e8263ef6978f722ccbf)
check_type(argname=\\"argument roles\\", value=roles, expected_type=type_hints[\\"roles\\"])
check_type(argname=\\"argument users\\", value=users, expected_type=type_hints[\\"users\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if roles is not None:
self._values[\\"roles\\"] = roles
if users is not None:
self._values[\\"users\\"] = users
@builtins.property
def roles(self) -> typing.Optional[typing.List[\\"KubernetesApiAccessEntry\\"]]:
'''
:schema: CfnClusterPropsKubernetesApiAccess#Roles
'''
result = self._values.get(\\"roles\\")
return typing.cast(typing.Optional[typing.List[\\"KubernetesApiAccessEntry\\"]], result)
@builtins.property
def users(self) -> typing.Optional[typing.List[\\"KubernetesApiAccessEntry\\"]]:
'''
:schema: CfnClusterPropsKubernetesApiAccess#Users
'''
result = self._values.get(\\"users\\")
return typing.cast(typing.Optional[typing.List[\\"KubernetesApiAccessEntry\\"]], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"CfnClusterPropsKubernetesApiAccess(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsKubernetesNetworkConfig\\",
jsii_struct_bases=[],
name_mapping={\\"service_ipv4_cidr\\": \\"serviceIpv4Cidr\\"},
)
class CfnClusterPropsKubernetesNetworkConfig:
def __init__(
self,
*,
service_ipv4_cidr: typing.Optional[builtins.str] = None,
) -> None:
'''Network configuration for Amazon EKS cluster.
:param service_ipv4_cidr: Specify the range from which cluster services will receive IPv4 addresses.
:schema: CfnClusterPropsKubernetesNetworkConfig
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__06f00070852ad34755fd4c5edc1bdb6d1944b8e3703b29a897c392a6f85b5fdf)
check_type(argname=\\"argument service_ipv4_cidr\\", value=service_ipv4_cidr, expected_type=type_hints[\\"service_ipv4_cidr\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if service_ipv4_cidr is not None:
self._values[\\"service_ipv4_cidr\\"] = service_ipv4_cidr
@builtins.property
def service_ipv4_cidr(self) -> typing.Optional[builtins.str]:
'''Specify the range from which cluster services will receive IPv4 addresses.
:schema: CfnClusterPropsKubernetesNetworkConfig#ServiceIpv4Cidr
'''
result = self._values.get(\\"service_ipv4_cidr\\")
return typing.cast(typing.Optional[builtins.str], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"CfnClusterPropsKubernetesNetworkConfig(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsResourcesVpcConfig\\",
jsii_struct_bases=[],
name_mapping={
\\"subnet_ids\\": \\"subnetIds\\",
\\"endpoint_private_access\\": \\"endpointPrivateAccess\\",
\\"endpoint_public_access\\": \\"endpointPublicAccess\\",
\\"public_access_cidrs\\": \\"publicAccessCidrs\\",
\\"security_group_ids\\": \\"securityGroupIds\\",
},
)
class CfnClusterPropsResourcesVpcConfig:
def __init__(
self,
*,
subnet_ids: typing.Sequence[builtins.str],
endpoint_private_access: typing.Optional[builtins.bool] = None,
endpoint_public_access: typing.Optional[builtins.bool] = None,
public_access_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
security_group_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
) -> None:
'''An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
:param subnet_ids: Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.
:param endpoint_private_access: Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false , which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods.
:param endpoint_public_access: Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true , which enables public access for your Kubernetes API server.
:param public_access_cidrs: The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.
:param security_group_ids: Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.
:schema: CfnClusterPropsResourcesVpcConfig
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__09f33c0f9b4ef6ec1dea52664b0cadda6462872b4e058ca64df4adae7d831528)
check_type(argname=\\"argument subnet_ids\\", value=subnet_ids, expected_type=type_hints[\\"subnet_ids\\"])
check_type(argname=\\"argument endpoint_private_access\\", value=endpoint_private_access, expected_type=type_hints[\\"endpoint_private_access\\"])
check_type(argname=\\"argument endpoint_public_access\\", value=endpoint_public_access, expected_type=type_hints[\\"endpoint_public_access\\"])
check_type(argname=\\"argument public_access_cidrs\\", value=public_access_cidrs, expected_type=type_hints[\\"public_access_cidrs\\"])
check_type(argname=\\"argument security_group_ids\\", value=security_group_ids, expected_type=type_hints[\\"security_group_ids\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {
\\"subnet_ids\\": subnet_ids,
}
if endpoint_private_access is not None:
self._values[\\"endpoint_private_access\\"] = endpoint_private_access
if endpoint_public_access is not None:
self._values[\\"endpoint_public_access\\"] = endpoint_public_access
if public_access_cidrs is not None:
self._values[\\"public_access_cidrs\\"] = public_access_cidrs
if security_group_ids is not None:
self._values[\\"security_group_ids\\"] = security_group_ids
@builtins.property
def subnet_ids(self) -> typing.List[builtins.str]:
'''Specify subnets for your Amazon EKS worker nodes.
Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.
:schema: CfnClusterPropsResourcesVpcConfig#SubnetIds
'''
result = self._values.get(\\"subnet_ids\\")
assert result is not None, \\"Required property 'subnet_ids' is missing\\"
return typing.cast(typing.List[builtins.str], result)
@builtins.property
def endpoint_private_access(self) -> typing.Optional[builtins.bool]:
'''Set this value to true to enable private access for your cluster's Kubernetes API server endpoint.
If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false , which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods.
:schema: CfnClusterPropsResourcesVpcConfig#EndpointPrivateAccess
'''
result = self._values.get(\\"endpoint_private_access\\")
return typing.cast(typing.Optional[builtins.bool], result)
@builtins.property
def endpoint_public_access(self) -> typing.Optional[builtins.bool]:
'''Set this value to false to disable public access to your cluster's Kubernetes API server endpoint.
If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true , which enables public access for your Kubernetes API server.
:schema: CfnClusterPropsResourcesVpcConfig#EndpointPublicAccess
'''
result = self._values.get(\\"endpoint_public_access\\")
return typing.cast(typing.Optional[builtins.bool], result)
@builtins.property
def public_access_cidrs(self) -> typing.Optional[typing.List[builtins.str]]:
'''The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint.
Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.
:schema: CfnClusterPropsResourcesVpcConfig#PublicAccessCidrs
'''
result = self._values.get(\\"public_access_cidrs\\")
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
@builtins.property
def security_group_ids(self) -> typing.Optional[typing.List[builtins.str]]:
'''Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane.
If you don't specify a security group, the default security group for your VPC is used.
:schema: CfnClusterPropsResourcesVpcConfig#SecurityGroupIds
'''
result = self._values.get(\\"security_group_ids\\")
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"CfnClusterPropsResourcesVpcConfig(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.CfnClusterPropsTags\\",
jsii_struct_bases=[],
name_mapping={\\"key\\": \\"key\\", \\"value\\": \\"value\\"},
)
class CfnClusterPropsTags:
def __init__(self, *, key: builtins.str, value: builtins.str) -> None:
'''
:param key:
:param value:
:schema: CfnClusterPropsTags
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__8c0a0ceac7d05d1baddfca750332d05e2ff84b371923312af407a26340290bf0)
check_type(argname=\\"argument key\\", value=key, expected_type=type_hints[\\"key\\"])
check_type(argname=\\"argument value\\", value=value, expected_type=type_hints[\\"value\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {
\\"key\\": key,
\\"value\\": value,
}
@builtins.property
def key(self) -> builtins.str:
'''
:schema: CfnClusterPropsTags#Key
'''
result = self._values.get(\\"key\\")
assert result is not None, \\"Required property 'key' is missing\\"
return typing.cast(builtins.str, result)
@builtins.property
def value(self) -> builtins.str:
'''
:schema: CfnClusterPropsTags#Value
'''
result = self._values.get(\\"value\\")
assert result is not None, \\"Required property 'value' is missing\\"
return typing.cast(builtins.str, result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"CfnClusterPropsTags(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.EncryptionConfigEntry\\",
jsii_struct_bases=[],
name_mapping={\\"provider\\": \\"provider\\", \\"resources\\": \\"resources\\"},
)
class EncryptionConfigEntry:
def __init__(
self,
*,
provider: typing.Optional[typing.Union[\\"Provider\\", typing.Dict[builtins.str, typing.Any]]] = None,
resources: typing.Optional[typing.Sequence[builtins.str]] = None,
) -> None:
'''The encryption configuration for the cluster.
:param provider:
:param resources: Specifies the resources to be encrypted. The only supported value is \\"secrets\\".
:schema: EncryptionConfigEntry
'''
if isinstance(provider, dict):
provider = Provider(**provider)
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__47d502d7d0fa6ace2fb16c740510550bbe28ebf723e312188b4db30e7d30cbd2)
check_type(argname=\\"argument provider\\", value=provider, expected_type=type_hints[\\"provider\\"])
check_type(argname=\\"argument resources\\", value=resources, expected_type=type_hints[\\"resources\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if provider is not None:
self._values[\\"provider\\"] = provider
if resources is not None:
self._values[\\"resources\\"] = resources
@builtins.property
def provider(self) -> typing.Optional[\\"Provider\\"]:
'''
:schema: EncryptionConfigEntry#Provider
'''
result = self._values.get(\\"provider\\")
return typing.cast(typing.Optional[\\"Provider\\"], result)
@builtins.property
def resources(self) -> typing.Optional[typing.List[builtins.str]]:
'''Specifies the resources to be encrypted.
The only supported value is \\"secrets\\".
:schema: EncryptionConfigEntry#Resources
'''
result = self._values.get(\\"resources\\")
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"EncryptionConfigEntry(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.KubernetesApiAccessEntry\\",
jsii_struct_bases=[],
name_mapping={\\"arn\\": \\"arn\\", \\"groups\\": \\"groups\\", \\"username\\": \\"username\\"},
)
class KubernetesApiAccessEntry:
def __init__(
self,
*,
arn: typing.Optional[builtins.str] = None,
groups: typing.Optional[typing.Sequence[builtins.str]] = None,
username: typing.Optional[builtins.str] = None,
) -> None:
'''
:param arn:
:param groups:
:param username:
:schema: KubernetesApiAccessEntry
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__b05ea8544382c89e6eb2e9bbfb81bf5d72f6d330053daa2df7f83f2f22391673)
check_type(argname=\\"argument arn\\", value=arn, expected_type=type_hints[\\"arn\\"])
check_type(argname=\\"argument groups\\", value=groups, expected_type=type_hints[\\"groups\\"])
check_type(argname=\\"argument username\\", value=username, expected_type=type_hints[\\"username\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if arn is not None:
self._values[\\"arn\\"] = arn
if groups is not None:
self._values[\\"groups\\"] = groups
if username is not None:
self._values[\\"username\\"] = username
@builtins.property
def arn(self) -> typing.Optional[builtins.str]:
'''
:schema: KubernetesApiAccessEntry#Arn
'''
result = self._values.get(\\"arn\\")
return typing.cast(typing.Optional[builtins.str], result)
@builtins.property
def groups(self) -> typing.Optional[typing.List[builtins.str]]:
'''
:schema: KubernetesApiAccessEntry#Groups
'''
result = self._values.get(\\"groups\\")
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
@builtins.property
def username(self) -> typing.Optional[builtins.str]:
'''
:schema: KubernetesApiAccessEntry#Username
'''
result = self._values.get(\\"username\\")
return typing.cast(typing.Optional[builtins.str], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"KubernetesApiAccessEntry(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Provider\\",
jsii_struct_bases=[],
name_mapping={\\"key_arn\\": \\"keyArn\\"},
)
class Provider:
def __init__(self, *, key_arn: typing.Optional[builtins.str] = None) -> None:
'''AWS Key Management Service (AWS KMS) customer master key (CMK).
Either the ARN or the alias can be used.
:param key_arn: Amazon Resource Name (ARN) or alias of the customer master key (CMK). The CMK must be symmetric, created in the same region as the cluster, and if the CMK was created in a different account, the user must have access to the CMK.
:schema: Provider
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__302dcaaeb5b949d5d051618ce402deb83217ae5e9fc48f7ce913119e9508e42e)
check_type(argname=\\"argument key_arn\\", value=key_arn, expected_type=type_hints[\\"key_arn\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if key_arn is not None:
self._values[\\"key_arn\\"] = key_arn
@builtins.property
def key_arn(self) -> typing.Optional[builtins.str]:
'''Amazon Resource Name (ARN) or alias of the customer master key (CMK).
The CMK must be symmetric, created in the same region as the cluster, and if the CMK was created in a different account, the user must have access to the CMK.
:schema: Provider#KeyArn
'''
result = self._values.get(\\"key_arn\\")
return typing.cast(typing.Optional[builtins.str], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"Provider(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
__all__ = [
\\"CfnCluster\\",
\\"CfnClusterProps\\",
\\"CfnClusterPropsKubernetesApiAccess\\",
\\"CfnClusterPropsKubernetesNetworkConfig\\",
\\"CfnClusterPropsResourcesVpcConfig\\",
\\"CfnClusterPropsTags\\",
\\"EncryptionConfigEntry\\",
\\"KubernetesApiAccessEntry\\",
\\"Provider\\",
]
publication.publish()
def _typecheckingstub__bacecc56333714eb669ab7a48888241533b00927d8923c503a672032982224f1(
scope: _constructs_77d1e7e8.Construct,
id: builtins.str,
*,
resources_vpc_config: typing.Union[CfnClusterPropsResourcesVpcConfig, typing.Dict[builtins.str, typing.Any]],
role_arn: builtins.str,
enabled_cluster_logging_types: typing.Optional[typing.Sequence[builtins.str]] = None,
encryption_config: typing.Optional[typing.Sequence[typing.Union[EncryptionConfigEntry, typing.Dict[builtins.str, typing.Any]]]] = None,
kubernetes_api_access: typing.Optional[typing.Union[CfnClusterPropsKubernetesApiAccess, typing.Dict[builtins.str, typing.Any]]] = None,
kubernetes_network_config: typing.Optional[typing.Union[CfnClusterPropsKubernetesNetworkConfig, typing.Dict[builtins.str, typing.Any]]] = None,
lambda_role_name: typing.Optional[builtins.str] = None,
name: typing.Optional[builtins.str] = None,
tags: typing.Optional[typing.Sequence[typing.Union[CfnClusterPropsTags, typing.Dict[builtins.str, typing.Any]]]] = None,
version: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__5c9825b6539ead7fd67aff9c082b9af5d5f56e8e41f5947f6cb3b6afe672122f(
*,
resources_vpc_config: typing.Union[CfnClusterPropsResourcesVpcConfig, typing.Dict[builtins.str, typing.Any]],
role_arn: builtins.str,
enabled_cluster_logging_types: typing.Optional[typing.Sequence[builtins.str]] = None,
encryption_config: typing.Optional[typing.Sequence[typing.Union[EncryptionConfigEntry, typing.Dict[builtins.str, typing.Any]]]] = None,
kubernetes_api_access: typing.Optional[typing.Union[CfnClusterPropsKubernetesApiAccess, typing.Dict[builtins.str, typing.Any]]] = None,
kubernetes_network_config: typing.Optional[typing.Union[CfnClusterPropsKubernetesNetworkConfig, typing.Dict[builtins.str, typing.Any]]] = None,
lambda_role_name: typing.Optional[builtins.str] = None,
name: typing.Optional[builtins.str] = None,
tags: typing.Optional[typing.Sequence[typing.Union[CfnClusterPropsTags, typing.Dict[builtins.str, typing.Any]]]] = None,
version: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__0a50b00c849246852acb04761c601a9c20ed943ed5118e8263ef6978f722ccbf(
*,
roles: typing.Optional[typing.Sequence[typing.Union[KubernetesApiAccessEntry, typing.Dict[builtins.str, typing.Any]]]] = None,
users: typing.Optional[typing.Sequence[typing.Union[KubernetesApiAccessEntry, typing.Dict[builtins.str, typing.Any]]]] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__06f00070852ad34755fd4c5edc1bdb6d1944b8e3703b29a897c392a6f85b5fdf(
*,
service_ipv4_cidr: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__09f33c0f9b4ef6ec1dea52664b0cadda6462872b4e058ca64df4adae7d831528(
*,
subnet_ids: typing.Sequence[builtins.str],
endpoint_private_access: typing.Optional[builtins.bool] = None,
endpoint_public_access: typing.Optional[builtins.bool] = None,
public_access_cidrs: typing.Optional[typing.Sequence[builtins.str]] = None,
security_group_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__8c0a0ceac7d05d1baddfca750332d05e2ff84b371923312af407a26340290bf0(
*,
key: builtins.str,
value: builtins.str,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__47d502d7d0fa6ace2fb16c740510550bbe28ebf723e312188b4db30e7d30cbd2(
*,
provider: typing.Optional[typing.Union[Provider, typing.Dict[builtins.str, typing.Any]]] = None,
resources: typing.Optional[typing.Sequence[builtins.str]] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__b05ea8544382c89e6eb2e9bbfb81bf5d72f6d330053daa2df7f83f2f22391673(
*,
arn: typing.Optional[builtins.str] = None,
groups: typing.Optional[typing.Sequence[builtins.str]] = None,
username: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__302dcaaeb5b949d5d051618ce402deb83217ae5e9fc48f7ce913119e9508e42e(
*,
key_arn: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
",
"awsqs_eks_cluster/_jsii/__init__.py" => "import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
from typeguard import check_type
import aws_cdk._jsii
import aws_cdk.asset_awscli_v1._jsii
import aws_cdk.asset_kubectl_v20._jsii
import aws_cdk.asset_node_proxy_agent_v5._jsii
import constructs._jsii
__jsii_assembly__ = jsii.JSIIAssembly.load(
\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6\\",
\\"0.0.0\\",
__name__[0:-6],
\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6@0.0.0.jsii.tgz\\",
)
__all__ = [
\\"__jsii_assembly__\\",
]
publication.publish()
",
"awsqs_eks_cluster/py.typed" => "
",
}
`;
exports[`python 2`] = `
Map {
"ec2_compute_instance/__init__.py" => "import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
from typeguard import check_type
from ._jsii import *
import aws_cdk as _aws_cdk_ceddda9d
import constructs as _constructs_77d1e7e8
@jsii.data_type(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstanceProps\\",
jsii_struct_bases=[],
name_mapping={
\\"instance_type\\": \\"instanceType\\",
\\"numbers\\": \\"numbers\\",
\\"ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter\\": \\"ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter\\",
},
)
class Ec2ComputeInstanceProps:
def __init__(
self,
*,
instance_type: typing.Optional[\\"Ec2ComputeInstance.InstanceType\\"] = None,
numbers: typing.Optional[\\"Ec2ComputeInstance.Numbers\\"] = None,
ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: typing.Optional[builtins.str] = None,
) -> None:
'''
:param instance_type: InstanceType. The instance type of an EC2 instance. Must be t2 micro or small. Default: t2.micro
:param numbers: Numbers. A number to be selected. These are the allowed numbers. Default: 5
:param ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter. Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__4bc288f73b6f04c4cbe3c81dfe5460cb602875447ace7cbee7c0cf0c364a45dc)
check_type(argname=\\"argument instance_type\\", value=instance_type, expected_type=type_hints[\\"instance_type\\"])
check_type(argname=\\"argument numbers\\", value=numbers, expected_type=type_hints[\\"numbers\\"])
check_type(argname=\\"argument ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter\\", value=ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter, expected_type=type_hints[\\"ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter\\"])
self._values: typing.Dict[builtins.str, typing.Any] = {}
if instance_type is not None:
self._values[\\"instance_type\\"] = instance_type
if numbers is not None:
self._values[\\"numbers\\"] = numbers
if ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter is not None:
self._values[\\"ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter\\"] = ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter
@builtins.property
def instance_type(self) -> typing.Optional[\\"Ec2ComputeInstance.InstanceType\\"]:
'''InstanceType.
The instance type of an EC2 instance.
Must be t2 micro or small.
:default: t2.micro
'''
result = self._values.get(\\"instance_type\\")
return typing.cast(typing.Optional[\\"Ec2ComputeInstance.InstanceType\\"], result)
@builtins.property
def numbers(self) -> typing.Optional[\\"Ec2ComputeInstance.Numbers\\"]:
'''Numbers.
A number to be selected.
These are the allowed numbers.
:default: 5
'''
result = self._values.get(\\"numbers\\")
return typing.cast(typing.Optional[\\"Ec2ComputeInstance.Numbers\\"], result)
@builtins.property
def ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter(
self,
) -> typing.Optional[builtins.str]:
'''SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter.
:default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
'''
result = self._values.get(\\"ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter\\")
return typing.cast(typing.Optional[builtins.str], result)
def __eq__(self, rhs: typing.Any) -> builtins.bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values
def __ne__(self, rhs: typing.Any) -> builtins.bool:
return not (rhs == self)
def __repr__(self) -> str:
return \\"Ec2ComputeInstanceProps(%s)\\" % \\", \\".join(
k + \\"=\\" + repr(v) for k, v in self._values.items()
)
@jsii.interface(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.IEc2ComputeInstance\\"
)
class IEc2ComputeInstance(_aws_cdk_ceddda9d.IResource, typing_extensions.Protocol):
@builtins.property
@jsii.member(jsii_name=\\"cloudFormationStackArn\\")
def cloud_formation_stack_arn(self) -> builtins.str:
...
@builtins.property
@jsii.member(jsii_name=\\"downloadKeyCommand\\")
def download_key_command(self) -> builtins.str:
...
@builtins.property
@jsii.member(jsii_name=\\"iPAddress\\")
def i_p_address(self) -> builtins.str:
...
@builtins.property
@jsii.member(jsii_name=\\"provisionedProductId\\")
def provisioned_product_id(self) -> builtins.str:
...
@builtins.property
@jsii.member(jsii_name=\\"recordId\\")
def record_id(self) -> builtins.str:
...
@builtins.property
@jsii.member(jsii_name=\\"sshcommand\\")
def sshcommand(self) -> builtins.str:
...
class _IEc2ComputeInstanceProxy(
jsii.proxy_for(_aws_cdk_ceddda9d.IResource), # type: ignore[misc]
):
__jsii_type__: typing.ClassVar[str] = \\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.IEc2ComputeInstance\\"
@builtins.property
@jsii.member(jsii_name=\\"cloudFormationStackArn\\")
def cloud_formation_stack_arn(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"cloudFormationStackArn\\"))
@builtins.property
@jsii.member(jsii_name=\\"downloadKeyCommand\\")
def download_key_command(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"downloadKeyCommand\\"))
@builtins.property
@jsii.member(jsii_name=\\"iPAddress\\")
def i_p_address(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"iPAddress\\"))
@builtins.property
@jsii.member(jsii_name=\\"provisionedProductId\\")
def provisioned_product_id(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"provisionedProductId\\"))
@builtins.property
@jsii.member(jsii_name=\\"recordId\\")
def record_id(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"recordId\\"))
@builtins.property
@jsii.member(jsii_name=\\"sshcommand\\")
def sshcommand(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"sshcommand\\"))
# Adding a \\"__jsii_proxy_class__(): typing.Type\\" function to the interface
typing.cast(typing.Any, IEc2ComputeInstance).__jsii_proxy_class__ = lambda : _IEc2ComputeInstanceProxy
@jsii.implements(IEc2ComputeInstance)
class Ec2ComputeInstance(
_aws_cdk_ceddda9d.Resource,
metaclass=jsii.JSIIMeta,
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance\\",
):
'''Ec2ComputeInstance.
Compute instance to be used for experiments, does NOT contain DB access
Owner: IT
'''
def __init__(
self,
scope: _constructs_77d1e7e8.Construct,
id: builtins.str,
*,
instance_type: typing.Optional[\\"Ec2ComputeInstance.InstanceType\\"] = None,
numbers: typing.Optional[\\"Ec2ComputeInstance.Numbers\\"] = None,
ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: typing.Optional[builtins.str] = None,
) -> None:
'''Create a new Service Catalog \`Ec2ComputeInstance\` product.
:param scope: - scope in which this resource is defined.
:param id: - scoped id of the resource.
:param instance_type: InstanceType. The instance type of an EC2 instance. Must be t2 micro or small. Default: t2.micro
:param numbers: Numbers. A number to be selected. These are the allowed numbers. Default: 5
:param ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter. Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
'''
if __debug__:
type_hints = typing.get_type_hints(_typecheckingstub__0784cfb843b6f72ff9d9cf293d897b54b852a1398816e3d2c2c812c8a4dbf0cf)
check_type(argname=\\"argument scope\\", value=scope, expected_type=type_hints[\\"scope\\"])
check_type(argname=\\"argument id\\", value=id, expected_type=type_hints[\\"id\\"])
props = Ec2ComputeInstanceProps(
instance_type=instance_type,
numbers=numbers,
ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter=ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter,
)
jsii.create(self.__class__, self, [scope, id, props])
@builtins.property
@jsii.member(jsii_name=\\"cloudFormationStackArn\\")
def cloud_formation_stack_arn(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"cloudFormationStackArn\\"))
@builtins.property
@jsii.member(jsii_name=\\"downloadKeyCommand\\")
def download_key_command(self) -> builtins.str:
'''The command to download the key.'''
return typing.cast(builtins.str, jsii.get(self, \\"downloadKeyCommand\\"))
@builtins.property
@jsii.member(jsii_name=\\"iPAddress\\")
def i_p_address(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"iPAddress\\"))
@builtins.property
@jsii.member(jsii_name=\\"provisionedProductId\\")
def provisioned_product_id(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"provisionedProductId\\"))
@builtins.property
@jsii.member(jsii_name=\\"recordId\\")
def record_id(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"recordId\\"))
@builtins.property
@jsii.member(jsii_name=\\"sshcommand\\")
def sshcommand(self) -> builtins.str:
return typing.cast(builtins.str, jsii.get(self, \\"sshcommand\\"))
@jsii.enum(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.InstanceType\\"
)
class InstanceType(enum.Enum):
T2_MICRO = \\"T2_MICRO\\"
'''t2.micro.'''
T2_SMALL = \\"T2_SMALL\\"
'''t2.small.'''
@jsii.enum(
jsii_type=\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6.Ec2ComputeInstance.Numbers\\"
)
class Numbers(enum.Enum):
VALUE_1 = \\"VALUE_1\\"
'''1.'''
VALUE_2 = \\"VALUE_2\\"
'''2.'''
VALUE_3 = \\"VALUE_3\\"
'''3.'''
VALUE_4 = \\"VALUE_4\\"
'''4.'''
VALUE_5 = \\"VALUE_5\\"
'''5.'''
__all__ = [
\\"Ec2ComputeInstance\\",
\\"Ec2ComputeInstanceProps\\",
\\"IEc2ComputeInstance\\",
]
publication.publish()
def _typecheckingstub__4bc288f73b6f04c4cbe3c81dfe5460cb602875447ace7cbee7c0cf0c364a45dc(
*,
instance_type: typing.Optional[Ec2ComputeInstance.InstanceType] = None,
numbers: typing.Optional[Ec2ComputeInstance.Numbers] = None,
ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
def _typecheckingstub__0784cfb843b6f72ff9d9cf293d897b54b852a1398816e3d2c2c812c8a4dbf0cf(
scope: _constructs_77d1e7e8.Construct,
id: builtins.str,
*,
instance_type: typing.Optional[Ec2ComputeInstance.InstanceType] = None,
numbers: typing.Optional[Ec2ComputeInstance.Numbers] = None,
ssm_parameter_valueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2_c96584_b6_f00_a464_ead1953_aff4_b05118_parameter: typing.Optional[builtins.str] = None,
) -> None:
\\"\\"\\"Type checking stubs\\"\\"\\"
pass
",
"ec2_compute_instance/_jsii/__init__.py" => "import abc
import builtins
import datetime
import enum
import typing
import jsii
import publication
import typing_extensions
from typeguard import check_type
import aws_cdk._jsii
import aws_cdk.asset_awscli_v1._jsii
import aws_cdk.asset_kubectl_v20._jsii
import aws_cdk.asset_node_proxy_agent_v5._jsii
import constructs._jsii
__jsii_assembly__ = jsii.JSIIAssembly.load(
\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6\\",
\\"0.0.0\\",
__name__[0:-6],
\\"1bc04b5291c26a46d918139138b992d2de976d6851d0893b0476b85bfbdfc6e6@0.0.0.jsii.tgz\\",
)
__all__ = [
\\"__jsii_assembly__\\",
]
publication.publish()
",
"ec2_compute_instance/py.typed" => "
",
}
`;
exports[`typescript 1`] = `
Map {
"awsqs-eks-cluster.ts" => "// Generated by cdk-import
import * as cdk from 'aws-cdk-lib';
import * as constructs from 'constructs';
/**
* A resource that creates Amazon Elastic Kubernetes Service (Amazon EKS) clusters.
*
* @schema CfnClusterProps
*/
export interface CfnClusterProps {
/**
* A unique name for your cluster.
*
* @schema CfnClusterProps#Name
*/
readonly name?: string;
/**
* Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This provides permissions for Amazon EKS to call other AWS APIs.
*
* @schema CfnClusterProps#RoleArn
*/
readonly roleArn: string;
/**
* Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. this provides permissions for Lambda to be invoked and attach to the cluster VPC
*
* @schema CfnClusterProps#LambdaRoleName
*/
readonly lambdaRoleName?: string;
/**
* Desired Kubernetes version for your cluster. If you don't specify this value, the cluster uses the latest version from Amazon EKS.
*
* @schema CfnClusterProps#Version
*/
readonly version?: string;
/**
* Network configuration for Amazon EKS cluster.
*
*
*
* @schema CfnClusterProps#KubernetesNetworkConfig
*/
readonly kubernetesNetworkConfig?: CfnClusterPropsKubernetesNetworkConfig;
/**
* An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
*
* @schema CfnClusterProps#ResourcesVpcConfig
*/
readonly resourcesVpcConfig: CfnClusterPropsResourcesVpcConfig;
/**
* Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs. By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
*
* @schema CfnClusterProps#EnabledClusterLoggingTypes
*/
readonly enabledClusterLoggingTypes?: string[];
/**
* Encryption configuration for the cluster.
*
* @schema CfnClusterProps#EncryptionConfig
*/
readonly encryptionConfig?: EncryptionConfigEntry[];
/**
* @schema CfnClusterProps#KubernetesApiAccess
*/
readonly kubernetesApiAccess?: CfnClusterPropsKubernetesApiAccess;
/**
* @schema CfnClusterProps#Tags
*/
readonly tags?: CfnClusterPropsTags[];
}
/**
* Converts an object of type 'CfnClusterProps' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CfnClusterProps(obj: CfnClusterProps | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'Name': obj.name,
'RoleArn': obj.roleArn,
'LambdaRoleName': obj.lambdaRoleName,
'Version': obj.version,
'KubernetesNetworkConfig': toJson_CfnClusterPropsKubernetesNetworkConfig(obj.kubernetesNetworkConfig),
'ResourcesVpcConfig': toJson_CfnClusterPropsResourcesVpcConfig(obj.resourcesVpcConfig),
'EnabledClusterLoggingTypes': obj.enabledClusterLoggingTypes?.map(y => y),
'EncryptionConfig': obj.encryptionConfig?.map(y => toJson_EncryptionConfigEntry(y)),
'KubernetesApiAccess': toJson_CfnClusterPropsKubernetesApiAccess(obj.kubernetesApiAccess),
'Tags': obj.tags?.map(y => toJson_CfnClusterPropsTags(y)),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* Network configuration for Amazon EKS cluster.
*
*
*
* @schema CfnClusterPropsKubernetesNetworkConfig
*/
export interface CfnClusterPropsKubernetesNetworkConfig {
/**
* Specify the range from which cluster services will receive IPv4 addresses.
*
* @schema CfnClusterPropsKubernetesNetworkConfig#ServiceIpv4Cidr
*/
readonly serviceIpv4Cidr?: string;
}
/**
* Converts an object of type 'CfnClusterPropsKubernetesNetworkConfig' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CfnClusterPropsKubernetesNetworkConfig(obj: CfnClusterPropsKubernetesNetworkConfig | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'ServiceIpv4Cidr': obj.serviceIpv4Cidr,
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
*
* @schema CfnClusterPropsResourcesVpcConfig
*/
export interface CfnClusterPropsResourcesVpcConfig {
/**
* Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.
*
* @schema CfnClusterPropsResourcesVpcConfig#SecurityGroupIds
*/
readonly securityGroupIds?: string[];
/**
* Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.
*
* @schema CfnClusterPropsResourcesVpcConfig#SubnetIds
*/
readonly subnetIds: string[];
/**
* Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true , which enables public access for your Kubernetes API server.
*
* @schema CfnClusterPropsResourcesVpcConfig#EndpointPublicAccess
*/
readonly endpointPublicAccess?: boolean;
/**
* Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false , which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods.
*
* @schema CfnClusterPropsResourcesVpcConfig#EndpointPrivateAccess
*/
readonly endpointPrivateAccess?: boolean;
/**
* The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0 . If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.
*
* @schema CfnClusterPropsResourcesVpcConfig#PublicAccessCidrs
*/
readonly publicAccessCidrs?: string[];
}
/**
* Converts an object of type 'CfnClusterPropsResourcesVpcConfig' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CfnClusterPropsResourcesVpcConfig(obj: CfnClusterPropsResourcesVpcConfig | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'SecurityGroupIds': obj.securityGroupIds?.map(y => y),
'SubnetIds': obj.subnetIds?.map(y => y),
'EndpointPublicAccess': obj.endpointPublicAccess,
'EndpointPrivateAccess': obj.endpointPrivateAccess,
'PublicAccessCidrs': obj.publicAccessCidrs?.map(y => y),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* The encryption configuration for the cluster.
*
* @schema EncryptionConfigEntry
*/
export interface EncryptionConfigEntry {
/**
* Specifies the resources to be encrypted. The only supported value is \\"secrets\\".
*
* @schema EncryptionConfigEntry#Resources
*/
readonly resources?: string[];
/**
* @schema EncryptionConfigEntry#Provider
*/
readonly provider?: Provider;
}
/**
* Converts an object of type 'EncryptionConfigEntry' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_EncryptionConfigEntry(obj: EncryptionConfigEntry | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'Resources': obj.resources?.map(y => y),
'Provider': toJson_Provider(obj.provider),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* @schema CfnClusterPropsKubernetesApiAccess
*/
export interface CfnClusterPropsKubernetesApiAccess {
/**
* @schema CfnClusterPropsKubernetesApiAccess#Roles
*/
readonly roles?: KubernetesApiAccessEntry[];
/**
* @schema CfnClusterPropsKubernetesApiAccess#Users
*/
readonly users?: KubernetesApiAccessEntry[];
}
/**
* Converts an object of type 'CfnClusterPropsKubernetesApiAccess' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CfnClusterPropsKubernetesApiAccess(obj: CfnClusterPropsKubernetesApiAccess | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'Roles': obj.roles?.map(y => toJson_KubernetesApiAccessEntry(y)),
'Users': obj.users?.map(y => toJson_KubernetesApiAccessEntry(y)),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* @schema CfnClusterPropsTags
*/
export interface CfnClusterPropsTags {
/**
* @schema CfnClusterPropsTags#Value
*/
readonly value: string;
/**
* @schema CfnClusterPropsTags#Key
*/
readonly key: string;
}
/**
* Converts an object of type 'CfnClusterPropsTags' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CfnClusterPropsTags(obj: CfnClusterPropsTags | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'Value': obj.value,
'Key': obj.key,
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* AWS Key Management Service (AWS KMS) customer master key (CMK). Either the ARN or the alias can be used.
*
* @schema Provider
*/
export interface Provider {
/**
* Amazon Resource Name (ARN) or alias of the customer master key (CMK). The CMK must be symmetric, created in the same region as the cluster, and if the CMK was created in a different account, the user must have access to the CMK.
*
* @schema Provider#KeyArn
*/
readonly keyArn?: string;
}
/**
* Converts an object of type 'Provider' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_Provider(obj: Provider | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'KeyArn': obj.keyArn,
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* @schema KubernetesApiAccessEntry
*/
export interface KubernetesApiAccessEntry {
/**
* @schema KubernetesApiAccessEntry#Arn
*/
readonly arn?: string;
/**
* @schema KubernetesApiAccessEntry#Username
*/
readonly username?: string;
/**
* @schema KubernetesApiAccessEntry#Groups
*/
readonly groups?: string[];
}
/**
* Converts an object of type 'KubernetesApiAccessEntry' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_KubernetesApiAccessEntry(obj: KubernetesApiAccessEntry | undefined): Record | undefined {
if (obj === undefined) { return undefined; }
const result = {
'Arn': obj.arn,
'Username': obj.username,
'Groups': obj.groups?.map(y => y),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */
/**
* A CloudFormation \`AWSQS::EKS::Cluster\`
*
* @cloudformationResource AWSQS::EKS::Cluster
* @stability external
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
export class CfnCluster extends cdk.CfnResource {
/**
* The CloudFormation resource type name for this resource class.
*/
public static readonly CFN_RESOURCE_TYPE_NAME = 'AWSQS::EKS::Cluster';
/**
* \`AWSQS::EKS::Cluster.Name\`
* A unique name for your cluster.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly name: string | undefined;
/**
* \`AWSQS::EKS::Cluster.RoleArn\`
* Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role. This provides permissions for Amazon EKS to call other AWS APIs.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly roleArn: string;
/**
* \`AWSQS::EKS::Cluster.LambdaRoleName\`
* Name of the AWS Identity and Access Management (IAM) role used for clusters that have the public endpoint disabled. this provides permissions for Lambda to be invoked and attach to the cluster VPC
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly lambdaRoleName: string | undefined;
/**
* \`AWSQS::EKS::Cluster.Version\`
* Desired Kubernetes version for your cluster. If you don't specify this value, the cluster uses the latest version from Amazon EKS.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly version: string | undefined;
/**
* \`AWSQS::EKS::Cluster.KubernetesNetworkConfig\`
* Network configuration for Amazon EKS cluster.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly kubernetesNetworkConfig: any | undefined;
/**
* \`AWSQS::EKS::Cluster.ResourcesVpcConfig\`
* An object that represents the virtual private cloud (VPC) configuration to use for an Amazon EKS cluster.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly resourcesVpcConfig: any;
/**
* \`AWSQS::EKS::Cluster.EnabledClusterLoggingTypes\`
* Enables exporting of logs from the Kubernetes control plane to Amazon CloudWatch Logs. By default, logs from the cluster control plane are not exported to CloudWatch Logs. The valid log types are api, audit, authenticator, controllerManager, and scheduler.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly enabledClusterLoggingTypes: string[] | undefined;
/**
* \`AWSQS::EKS::Cluster.EncryptionConfig\`
* Encryption configuration for the cluster.
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly encryptionConfig: EncryptionConfigEntry[] | undefined;
/**
* \`AWSQS::EKS::Cluster.KubernetesApiAccess\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly kubernetesApiAccess: any | undefined;
/**
* \`AWSQS::EKS::Cluster.Tags\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly tags: any[] | undefined;
/**
* Attribute \`AWSQS::EKS::Cluster.Arn\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrArn: string;
/**
* Attribute \`AWSQS::EKS::Cluster.Endpoint\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrEndpoint: string;
/**
* Attribute \`AWSQS::EKS::Cluster.ClusterSecurityGroupId\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrClusterSecurityGroupId: string;
/**
* Attribute \`AWSQS::EKS::Cluster.CertificateAuthorityData\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrCertificateAuthorityData: string;
/**
* Attribute \`AWSQS::EKS::Cluster.EncryptionConfigKeyArn\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrEncryptionConfigKeyArn: string;
/**
* Attribute \`AWSQS::EKS::Cluster.OIDCIssuerURL\`
* @link https://github.com/aws-quickstart/quickstart-amazon-eks-cluster-resource-provider.git
*/
public readonly attrOIDCIssuerURL: string;
/**
* Create a new \`AWSQS::EKS::Cluster\`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnClusterProps) {
super(scope, id, { type: CfnCluster.CFN_RESOURCE_TYPE_NAME, properties: toJson_CfnClusterProps(props)! });
this.name = props.name;
this.roleArn = props.roleArn;
this.lambdaRoleName = props.lambdaRoleName;
this.version = props.version;
this.kubernetesNetworkConfig = props.kubernetesNetworkConfig;
this.resourcesVpcConfig = props.resourcesVpcConfig;
this.enabledClusterLoggingTypes = props.enabledClusterLoggingTypes;
this.encryptionConfig = props.encryptionConfig;
this.kubernetesApiAccess = props.kubernetesApiAccess;
this.tags = props.tags;
this.attrArn = cdk.Token.asString(this.getAtt('Arn'));
this.attrEndpoint = cdk.Token.asString(this.getAtt('Endpoint'));
this.attrClusterSecurityGroupId = cdk.Token.asString(this.getAtt('ClusterSecurityGroupId'));
this.attrCertificateAuthorityData = cdk.Token.asString(this.getAtt('CertificateAuthorityData'));
this.attrEncryptionConfigKeyArn = cdk.Token.asString(this.getAtt('EncryptionConfigKeyArn'));
this.attrOIDCIssuerURL = cdk.Token.asString(this.getAtt('OIDCIssuerURL'));
}
}",
}
`;
exports[`typescript 2`] = `
Map {
"ec2-compute-instance.ts" => "// Generated by cdk-import
import * as cdk from 'aws-cdk-lib';
import * as sc from 'aws-cdk-lib/aws-servicecatalog';
import * as constructs from 'constructs';
export interface IEc2ComputeInstance extends cdk.IResource {
readonly provisionedProductId: string;
readonly cloudFormationStackArn: string;
readonly recordId: string;
readonly iPAddress: string;
readonly downloadKeyCommand: string;
readonly sshcommand: string;
}
abstract class Ec2ComputeInstanceBase extends cdk.Resource implements IEc2ComputeInstance {
public abstract readonly provisionedProductId: string;
public abstract readonly cloudFormationStackArn: string;
public abstract readonly recordId: string;
public abstract readonly iPAddress: string;
public abstract readonly downloadKeyCommand: string;
public abstract readonly sshcommand: string;
}
enum ParameterKeys {
ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter = 'SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter',
instanceType = 'InstanceType',
numbers = 'Numbers',
}
namespace ParameterKeys {
const reverseMap = new Map();
Object.keys(ParameterKeys).forEach((s: string) => {
const e = (ParameterKeys)[s];
reverseMap.set(s, e);
});
export function valueOf(str: string) {
return reverseMap.get(str);
}
}
export interface Ec2ComputeInstanceProps {
/**
* SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter
*
* @default /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2
*/
readonly ssmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter?: string;
/**
* InstanceType
*
* The instance type of an EC2 instance.
*
* Must be t2 micro or small.
*
* @default t2.micro
*/
readonly instanceType?: Ec2ComputeInstance.InstanceType;
/**
* Numbers
*
* A number to be selected.
*
* These are the allowed numbers.
*
* @default 5
*/
readonly numbers?: Ec2ComputeInstance.Numbers;
}
/**
* Ec2ComputeInstance
*
* Compute instance to be used for experiments, does NOT contain DB access
*
* Owner: IT
*/
export class Ec2ComputeInstance extends Ec2ComputeInstanceBase {
public readonly provisionedProductId: string;
public readonly cloudFormationStackArn: string;
public readonly recordId: string;
public readonly iPAddress: string;
/**
* The command to download the key
*/
public readonly downloadKeyCommand: string;
public readonly sshcommand: string;
private readonly provisionedProduct: sc.CfnCloudFormationProvisionedProduct;
/**
* Create a new Service Catalog \\\\\`Ec2ComputeInstance\\\\\` product.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope: constructs.Construct, id: string, props: Ec2ComputeInstanceProps) {
super(scope, id);
this.provisionedProduct = new sc.CfnCloudFormationProvisionedProduct(this, 'Resource', {
provisionedProductName: this.node.id,
provisioningArtifactName: 'EC2LargeInstance',
productName: 'Ec2ComputeInstance',
pathName: 'DevTools',
provisioningParameters:
Object.entries(props).map(([k, v]) => {
return {
key: ParameterKeys.valueOf(k) as string,
value: v as string,
};
}),
});
this.provisionedProductId = this.provisionedProduct.ref;
this.cloudFormationStackArn = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'CloudformationStackArn'));
this.recordId = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'RecordId'));
this.iPAddress = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.IPAddress'));
this.downloadKeyCommand = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.DownloadKeyCommand'));
this.sshcommand = cdk.Token.asString(cdk.Fn.getAtt(this.provisionedProduct.logicalId, 'Outputs.sshcommand'));
}
}
export namespace Ec2ComputeInstance {
export enum InstanceType {
/**
* t2.micro
*/
T2_MICRO = 't2.micro',
/**
* t2.small
*/
T2_SMALL = 't2.small',
}
export enum Numbers {
/**
* 1
*/
VALUE_1 = '1',
/**
* 2
*/
VALUE_2 = '2',
/**
* 3
*/
VALUE_3 = '3',
/**
* 4
*/
VALUE_4 = '4',
/**
* 5
*/
VALUE_5 = '5',
}
}",
}
`;