tech.condense.cdkconstructs.EntrypointStack Maven / Gradle / Ivy
Show all versions of cdkconstructs Show documentation
package tech.condense.cdkconstructs;
/**
* (experimental) The EntrypointStack creates an Entrypoint construct and optionally defines the monitoring configuration. It implements the IEntrypoint interface so that it can be used in other constructs and stacks without requiring to access to the underlying construct.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-12T08:57:01.477Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = tech.condense.cdkconstructs.$Module.class, fqn = "@condensetech/cdk-constructs.EntrypointStack")
public class EntrypointStack extends software.amazon.awscdk.Stack implements tech.condense.cdkconstructs.IEntrypoint {
protected EntrypointStack(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EntrypointStack(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public EntrypointStack(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull tech.condense.cdkconstructs.EntrypointStackProps 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") });
}
/**
* (experimental) It creates an ApplicationListenerRule for the HTTPS listener of the Entrypoint.
*
* This method doesn't require a priority to be explicitly set, and tracks the allocated priorities on a DynamoDB table to avoid conflicts.
*
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRule allocateListenerRule(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull tech.condense.cdkconstructs.AllocateApplicationListenerRuleProps props) {
return software.amazon.jsii.Kernel.call(this, "allocateListenerRule", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRule.class), 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") });
}
/**
* (experimental) Utility method that returns the HTTPS listener of the entrypoint in a cross-stack compatible way.
*
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationListener referenceListener(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
return software.amazon.jsii.Kernel.call(this, "referenceListener", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationListener.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* (experimental) The ALB that serves as the entrypoint.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer getAlb() {
return software.amazon.jsii.Kernel.get(this, "alb", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticloadbalancingv2.IApplicationLoadBalancer.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getDomainName() {
return software.amazon.jsii.Kernel.get(this, "domainName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) The Application Listener priority allocator for the entrypoint.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull tech.condense.cdkconstructs.IApplicationListenerPriorityAllocator getPriorityAllocator() {
return software.amazon.jsii.Kernel.get(this, "priorityAllocator", software.amazon.jsii.NativeType.forClass(tech.condense.cdkconstructs.IApplicationListenerPriorityAllocator.class));
}
/**
* (experimental) A fluent builder for {@link tech.condense.cdkconstructs.EntrypointStack}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
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 tech.condense.cdkconstructs.EntrypointStackProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new tech.condense.cdkconstructs.EntrypointStackProps.Builder();
}
/**
* (experimental) The domain name to which the entrypoint is associated.
*
* @return {@code this}
* @param domainName The domain name to which the entrypoint is associated. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder domainName(final java.lang.String domainName) {
this.props.domainName(domainName);
return this;
}
/**
* (experimental) The networking configuration for the entrypoint.
*
* @return {@code this}
* @param networking The networking configuration for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder networking(final tech.condense.cdkconstructs.INetworking networking) {
this.props.networking(networking);
return this;
}
/**
* (deprecated) Certificate properties for the entrypoint.
*
* Default: - A new certificate is created through ACM, bound to domainName, *.domainName.
*
* @return {@code this}
* @deprecated Use certificates
instead.
* @param certificate Certificate properties for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder certificate(final tech.condense.cdkconstructs.EntrypointCertificateProps certificate) {
this.props.certificate(certificate);
return this;
}
/**
* (experimental) Certificate properties for the entrypoint.
*
* Default: - A new certificate is created through ACM, bound to domainName, *.domainName.
*
* @return {@code this}
* @param certificates Certificate properties for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder certificates(final java.util.List extends tech.condense.cdkconstructs.EntrypointCertificateProps> certificates) {
this.props.certificates(certificates);
return this;
}
/**
* (experimental) The name of the entrypoint.
*
* This value is used as the name of the underlying Application Load Balancer (ALB)
* and as the prefix for the name of the associated security group.
*
* Default: - No name is specified.
*
* @return {@code this}
* @param entrypointName The name of the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder entrypointName(final java.lang.String entrypointName) {
this.props.entrypointName(entrypointName);
return this;
}
/**
* (deprecated) The name of the security group for the entrypoint.
*
* Default: `${entrypointName}-sg`
*
* @return {@code this}
* @deprecated Use securityGroupName
instead.
* @param entrypointSecurityGroupName The name of the security group for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder entrypointSecurityGroupName(final java.lang.String entrypointSecurityGroupName) {
this.props.entrypointSecurityGroupName(entrypointSecurityGroupName);
return this;
}
/**
* (experimental) The Route 53 hosted zone attributes for the domain name.
*
* @return {@code this}
* @param hostedZoneProps The Route 53 hosted zone attributes for the domain name. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder hostedZoneProps(final software.amazon.awscdk.services.route53.HostedZoneAttributes hostedZoneProps) {
this.props.hostedZoneProps(hostedZoneProps);
return this;
}
/**
* (experimental) The S3 bucket to store the logs of the ALB.
*
* Setting this will enable the access logs for the ALB.
*
* Default: - Logging is disabled.
*
* @return {@code this}
* @param logsBucket The S3 bucket to store the logs of the ALB. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logsBucket(final software.amazon.awscdk.services.s3.IBucket logsBucket) {
this.props.logsBucket(logsBucket);
return this;
}
/**
* (experimental) Customize the priority allocator for the entrypoint.
*
* @return {@code this}
* @param priorityAllocator Customize the priority allocator for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder priorityAllocator(final tech.condense.cdkconstructs.ApplicationListenerPriorityAllocatorConfig priorityAllocator) {
this.props.priorityAllocator(priorityAllocator);
return this;
}
/**
* (experimental) The name of the security group for the entrypoint.
*
* Default: `${entrypointName}-sg` if `entrypointName` is specified, otherwise no name is specified.
*
* @return {@code this}
* @param securityGroupName The name of the security group for the entrypoint. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder securityGroupName(final java.lang.String securityGroupName) {
this.props.securityGroupName(securityGroupName);
return this;
}
/**
* Include runtime versioning information in this Stack.
*
* Default: `analyticsReporting` setting of containing `App`, or value of
* 'aws:cdk:version-reporting' context key
*
* @return {@code this}
* @param analyticsReporting Include runtime versioning information in this Stack. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder analyticsReporting(final java.lang.Boolean analyticsReporting) {
this.props.analyticsReporting(analyticsReporting);
return this;
}
/**
* Enable this flag to allow native cross region stack references.
*
* Enabling this will create a CloudFormation custom resource
* in both the producing stack and consuming stack in order to perform the export/import
*
* This feature is currently experimental
*
* Default: false
*
* @return {@code this}
* @param crossRegionReferences Enable this flag to allow native cross region stack references. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder crossRegionReferences(final java.lang.Boolean crossRegionReferences) {
this.props.crossRegionReferences(crossRegionReferences);
return this;
}
/**
* A description of the stack.
*
* Default: - No description.
*
* @return {@code this}
* @param description A description of the stack. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* The AWS environment (account/region) where this stack will be deployed.
*
* Set the region
/account
fields of env
to either a concrete value to
* select the indicated environment (recommended for production stacks), or to
* the values of environment variables
* CDK_DEFAULT_REGION
/CDK_DEFAULT_ACCOUNT
to let the target environment
* depend on the AWS credentials/configuration that the CDK CLI is executed
* under (recommended for development stacks).
*
* If the Stack
is instantiated inside a Stage
, any undefined
* region
/account
fields from env
will default to the same field on the
* encompassing Stage
, if configured there.
*
* If either region
or account
are not set nor inherited from Stage
, the
* Stack will be considered "environment-agnostic"". Environment-agnostic
* stacks can be deployed to any environment but may not be able to take
* advantage of all features of the CDK. For example, they will not be able to
* use environmental context lookups such as ec2.Vpc.fromLookup
and will not
* automatically translate Service Principals to the right format based on the
* environment's AWS partition, and other such enhancements.
*
* Default: - The environment of the containing `Stage` if available,
* otherwise create the stack will be environment-agnostic.
*
* Example:
*
*
* // Use a concrete account and region to deploy this stack to:
* // `.account` and `.region` will simply return these values.
* new Stack(app, 'Stack1', {
* env: {
* account: '123456789012',
* region: 'us-east-1'
* },
* });
* // Use the CLI's current credentials to determine the target environment:
* // `.account` and `.region` will reflect the account+region the CLI
* // is configured to use (based on the user CLI credentials)
* new Stack(app, 'Stack2', {
* env: {
* account: process.env.CDK_DEFAULT_ACCOUNT,
* region: process.env.CDK_DEFAULT_REGION
* },
* });
* // Define multiple stacks stage associated with an environment
* const myStage = new Stage(app, 'MyStage', {
* env: {
* account: '123456789012',
* region: 'us-east-1'
* }
* });
* // both of these stacks will use the stage's account/region:
* // `.account` and `.region` will resolve to the concrete values as above
* new MyStack(myStage, 'Stack1');
* new YourStack(myStage, 'Stack2');
* // Define an environment-agnostic stack:
* // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
* // which will only resolve to actual values by CloudFormation during deployment.
* new MyStack(app, 'Stack1');
*
*
* @return {@code this}
* @param env The AWS environment (account/region) where this stack will be deployed. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder env(final software.amazon.awscdk.Environment env) {
this.props.env(env);
return this;
}
/**
* Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
*
* Default: - no permissions boundary is applied
*
* @return {@code this}
* @param permissionsBoundary Options for applying a permissions boundary to all IAM Roles and Users created within this Stage. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder permissionsBoundary(final software.amazon.awscdk.PermissionsBoundary permissionsBoundary) {
this.props.permissionsBoundary(permissionsBoundary);
return this;
}
/**
* Name to deploy the stack with.
*
* Default: - Derived from construct path.
*
* @return {@code this}
* @param stackName Name to deploy the stack with. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder stackName(final java.lang.String stackName) {
this.props.stackName(stackName);
return this;
}
/**
* Enable this flag to suppress indentation in generated CloudFormation templates.
*
* If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation
* context key will be used. If that is not specified, then the
* default value false
will be used.
*
* Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
*
* @return {@code this}
* @param suppressTemplateIndentation Enable this flag to suppress indentation in generated CloudFormation templates. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder suppressTemplateIndentation(final java.lang.Boolean suppressTemplateIndentation) {
this.props.suppressTemplateIndentation(suppressTemplateIndentation);
return this;
}
/**
* Synthesis method to use while deploying this stack.
*
* The Stack Synthesizer controls aspects of synthesis and deployment,
* like how assets are referenced and what IAM roles to use. For more
* information, see the README of the main CDK package.
*
* If not specified, the defaultStackSynthesizer
from App
will be used.
* If that is not specified, DefaultStackSynthesizer
is used if
* @aws-cdk/core:newStyleStackSynthesis
is set to true
or the CDK major
* version is v2. In CDK v1 LegacyStackSynthesizer
is the default if no
* other synthesizer is specified.
*
* Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
*
* @return {@code this}
* @param synthesizer Synthesis method to use while deploying this stack. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder synthesizer(final software.amazon.awscdk.IStackSynthesizer synthesizer) {
this.props.synthesizer(synthesizer);
return this;
}
/**
* Stack tags that will be applied to all the taggable resources and the stack itself.
*
* Default: {}
*
* @return {@code this}
* @param tags Stack tags that will be applied to all the taggable resources and the stack itself. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(final java.util.Map tags) {
this.props.tags(tags);
return this;
}
/**
* Whether to enable termination protection for this stack.
*
* Default: false
*
* @return {@code this}
* @param terminationProtection Whether to enable termination protection for this stack. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder terminationProtection(final java.lang.Boolean terminationProtection) {
this.props.terminationProtection(terminationProtection);
return this;
}
/**
* (experimental) The monitoring configuration to apply to this stack.
*
* Default: - No monitoring.
*
* @return {@code this}
* @param monitoring The monitoring configuration to apply to this stack. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder monitoring(final tech.condense.cdkconstructs.MonitoringFacadeProps monitoring) {
this.props.monitoring(monitoring);
return this;
}
/**
* @return a newly built instance of {@link tech.condense.cdkconstructs.EntrypointStack}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public tech.condense.cdkconstructs.EntrypointStack build() {
return new tech.condense.cdkconstructs.EntrypointStack(
this.scope,
this.id,
this.props.build()
);
}
}
}