Interface CfnConnectionGroupProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnConnectionGroupProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-24T11:33:10.384Z")
@Stability(Stable)
public interface CfnConnectionGroupProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnConnectionGroup
.
Example:
import software.amazon.awscdk.services.route53.*; // Create the simple Origin Bucket myBucket = new Bucket(this, "myBucket"); IOrigin s3Origin = S3BucketOrigin.withOriginAccessControl(myBucket, S3BucketOriginWithOACProps.builder() .originAccessLevels(List.of(AccessLevel.READ, AccessLevel.LIST)) .build()); // Create the Distribution construct Distribution myMultiTenantDistribution = Distribution.Builder.create(this, "cf-hosted-distribution") .defaultBehavior(BehaviorOptions.builder() .origin(s3Origin) .build()) .defaultRootObject("index.html") .build(); // Access the underlying L1 CfnDistribution to configure SaaS Manager properties which are not yet available in the L2 Distribution construct CfnDistribution cfnDistribution = (CfnDistribution)myMultiTenantDistribution.getNode().getDefaultChild(); DefaultCacheBehaviorProperty defaultCacheBehavior = DefaultCacheBehaviorProperty.builder() .targetOriginId(myBucket.getBucketArn()) .viewerProtocolPolicy("allow-all") .compress(false) .allowedMethods(List.of("GET", "HEAD")) .cachePolicyId(CachePolicy.CACHING_OPTIMIZED.getCachePolicyId()) .build(); // Create the updated distributionConfig DistributionConfigProperty distributionConfig = DistributionConfigProperty.builder() .defaultCacheBehavior(defaultCacheBehavior) .enabled(true) // the properties below are optional .connectionMode("tenant-only") .origins(List.of(OriginProperty.builder() .id(myBucket.getBucketArn()) .domainName(myBucket.getBucketDomainName()) .s3OriginConfig(S3OriginConfigProperty.builder().build()) .originPath("/{{tenantName}}") .build())) .tenantConfig(TenantConfigProperty.builder() .parameterDefinitions(List.of(ParameterDefinitionProperty.builder() .definition(DefinitionProperty.builder() .stringSchema(StringSchemaProperty.builder() .required(false) // the properties below are optional .comment("tenantName") .defaultValue("root") .build()) .build()) .name("tenantName") .build())) .build()) .build(); // Override the distribution configuration to enable multi-tenancy. cfnDistribution.getDistributionConfig() = distributionConfig; // Create a connection group and a cname record in an existing hosted zone to validate domain ownership CfnConnectionGroup connectionGroup = CfnConnectionGroup.Builder.create(this, "cf-hosted-connection-group") .enabled(true) .ipv6Enabled(true) .name("my-connection-group") .build(); // Import the existing hosted zone info, replacing with your hostedZoneId and zoneName String hostedZoneId = "YOUR_HOSTED_ZONE_ID"; String zoneName = "my.domain.com"; IHostedZone hostedZone = HostedZone.fromHostedZoneAttributes(this, "hosted-zone", HostedZoneAttributes.builder() .hostedZoneId(hostedZoneId) .zoneName(zoneName) .build()); CnameRecord record = CnameRecord.Builder.create(this, "cname-record") .domainName(connectionGroup.getAttrRoutingEndpoint()) .zone(hostedZone) .recordName("cf-hosted-tenant.my.domain.com") .build(); // Create the cloudfront-hosted tenant, passing in the previously created connection group CfnDistributionTenant cloudfrontHostedTenant = CfnDistributionTenant.Builder.create(this, "cf-hosted-tenant") .distributionId(myMultiTenantDistribution.getDistributionId()) .name("cf-hosted-tenant") .domains(List.of("cf-hosted-tenant.my.domain.com")) .connectionGroupId(connectionGroup.getAttrId()) .enabled(true) .managedCertificateRequest(ManagedCertificateRequestProperty.builder() .validationTokenHost("cloudfront") .build()) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnConnectionGroupProps
static final class
An implementation forCfnConnectionGroupProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
The ID of the Anycast static IP list.default Object
Whether the connection group is enabled.default Object
IPv6 is enabled for the connection group.getName()
The name of the connection group.getTags()
A complex type that contains zero or moreTag
elements.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of the connection group.- See Also:
-
getAnycastIpListId
The ID of the Anycast static IP list.- See Also:
-
getEnabled
Whether the connection group is enabled.- See Also:
-
getIpv6Enabled
IPv6 is enabled for the connection group.- See Also:
-
getTags
A complex type that contains zero or moreTag
elements.- See Also:
-
builder
- Returns:
- a
CfnConnectionGroupProps.Builder
ofCfnConnectionGroupProps
-