Show / Hide Table of Contents

Class CfnConnectionGroupProps

Properties for defining a CfnConnectionGroup.

Inheritance
object
CfnConnectionGroupProps
Implements
ICfnConnectionGroupProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnConnectionGroupProps : ICfnConnectionGroupProps
Syntax (vb)
Public Class CfnConnectionGroupProps Implements ICfnConnectionGroupProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Route53;


             // Create the simple Origin
             var myBucket = new Bucket(this, "myBucket");
             var s3Origin = S3BucketOrigin.WithOriginAccessControl(myBucket, new S3BucketOriginWithOACProps {
                 OriginAccessLevels = new [] { AccessLevel.READ, AccessLevel.LIST }
             });

             // Create the Distribution construct
             var myMultiTenantDistribution = new Distribution(this, "cf-hosted-distribution", new DistributionProps {
                 DefaultBehavior = new BehaviorOptions {
                     Origin = s3Origin
                 },
                 DefaultRootObject = "index.html"
             });

             // Access the underlying L1 CfnDistribution to configure SaaS Manager properties which are not yet available in the L2 Distribution construct
             var cfnDistribution = (CfnDistribution)myMultiTenantDistribution.Node.DefaultChild;

             var defaultCacheBehavior = new DefaultCacheBehaviorProperty {
                 TargetOriginId = myBucket.BucketArn,
                 ViewerProtocolPolicy = "allow-all",
                 Compress = false,
                 AllowedMethods = new [] { "GET", "HEAD" },
                 CachePolicyId = CachePolicy.CACHING_OPTIMIZED.CachePolicyId
             };
             // Create the updated distributionConfig
             var distributionConfig = new DistributionConfigProperty {
                 DefaultCacheBehavior = defaultCacheBehavior,
                 Enabled = true,
                 // the properties below are optional
                 ConnectionMode = "tenant-only",
                 Origins = new [] { new OriginProperty {
                     Id = myBucket.BucketArn,
                     DomainName = myBucket.BucketDomainName,
                     S3OriginConfig = new S3OriginConfigProperty { },
                     OriginPath = "/{{tenantName}}"
                 } },
                 TenantConfig = new TenantConfigProperty {
                     ParameterDefinitions = new [] { new ParameterDefinitionProperty {
                         Definition = new DefinitionProperty {
                             StringSchema = new StringSchemaProperty {
                                 Required = false,
                                 // the properties below are optional
                                 Comment = "tenantName",
                                 DefaultValue = "root"
                             }
                         },
                         Name = "tenantName"
                     } }
                 }
             };

             // Override the distribution configuration to enable multi-tenancy.
             cfnDistribution.DistributionConfig = distributionConfig;

             // Create a connection group and a cname record in an existing hosted zone to validate domain ownership
             var connectionGroup = new CfnConnectionGroup(this, "cf-hosted-connection-group", new CfnConnectionGroupProps {
                 Enabled = true,
                 Ipv6Enabled = true,
                 Name = "my-connection-group"
             });

             // Import the existing hosted zone info, replacing with your hostedZoneId and zoneName
             var hostedZoneId = "YOUR_HOSTED_ZONE_ID";
             var zoneName = "my.domain.com";
             var hostedZone = HostedZone.FromHostedZoneAttributes(this, "hosted-zone", new HostedZoneAttributes {
                 HostedZoneId = hostedZoneId,
                 ZoneName = zoneName
             });

             var record = new CnameRecord(this, "cname-record", new CnameRecordProps {
                 DomainName = connectionGroup.AttrRoutingEndpoint,
                 Zone = hostedZone,
                 RecordName = "cf-hosted-tenant.my.domain.com"
             });

             // Create the cloudfront-hosted tenant, passing in the previously created connection group
             var cloudfrontHostedTenant = new CfnDistributionTenant(this, "cf-hosted-tenant", new CfnDistributionTenantProps {
                 DistributionId = myMultiTenantDistribution.DistributionId,
                 Name = "cf-hosted-tenant",
                 Domains = new [] { "cf-hosted-tenant.my.domain.com" },
                 ConnectionGroupId = connectionGroup.AttrId,
                 Enabled = true,
                 ManagedCertificateRequest = new ManagedCertificateRequestProperty {
                     ValidationTokenHost = "cloudfront"
                 }
             });

Synopsis

Constructors

CfnConnectionGroupProps()

Properties for defining a CfnConnectionGroup.

Properties

AnycastIpListId

The ID of the Anycast static IP list.

Enabled

Whether the connection group is enabled.

Ipv6Enabled

IPv6 is enabled for the connection group.

Name

The name of the connection group.

Tags

A complex type that contains zero or more Tag elements.

Constructors

CfnConnectionGroupProps()

Properties for defining a CfnConnectionGroup.

public CfnConnectionGroupProps()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Route53;


             // Create the simple Origin
             var myBucket = new Bucket(this, "myBucket");
             var s3Origin = S3BucketOrigin.WithOriginAccessControl(myBucket, new S3BucketOriginWithOACProps {
                 OriginAccessLevels = new [] { AccessLevel.READ, AccessLevel.LIST }
             });

             // Create the Distribution construct
             var myMultiTenantDistribution = new Distribution(this, "cf-hosted-distribution", new DistributionProps {
                 DefaultBehavior = new BehaviorOptions {
                     Origin = s3Origin
                 },
                 DefaultRootObject = "index.html"
             });

             // Access the underlying L1 CfnDistribution to configure SaaS Manager properties which are not yet available in the L2 Distribution construct
             var cfnDistribution = (CfnDistribution)myMultiTenantDistribution.Node.DefaultChild;

             var defaultCacheBehavior = new DefaultCacheBehaviorProperty {
                 TargetOriginId = myBucket.BucketArn,
                 ViewerProtocolPolicy = "allow-all",
                 Compress = false,
                 AllowedMethods = new [] { "GET", "HEAD" },
                 CachePolicyId = CachePolicy.CACHING_OPTIMIZED.CachePolicyId
             };
             // Create the updated distributionConfig
             var distributionConfig = new DistributionConfigProperty {
                 DefaultCacheBehavior = defaultCacheBehavior,
                 Enabled = true,
                 // the properties below are optional
                 ConnectionMode = "tenant-only",
                 Origins = new [] { new OriginProperty {
                     Id = myBucket.BucketArn,
                     DomainName = myBucket.BucketDomainName,
                     S3OriginConfig = new S3OriginConfigProperty { },
                     OriginPath = "/{{tenantName}}"
                 } },
                 TenantConfig = new TenantConfigProperty {
                     ParameterDefinitions = new [] { new ParameterDefinitionProperty {
                         Definition = new DefinitionProperty {
                             StringSchema = new StringSchemaProperty {
                                 Required = false,
                                 // the properties below are optional
                                 Comment = "tenantName",
                                 DefaultValue = "root"
                             }
                         },
                         Name = "tenantName"
                     } }
                 }
             };

             // Override the distribution configuration to enable multi-tenancy.
             cfnDistribution.DistributionConfig = distributionConfig;

             // Create a connection group and a cname record in an existing hosted zone to validate domain ownership
             var connectionGroup = new CfnConnectionGroup(this, "cf-hosted-connection-group", new CfnConnectionGroupProps {
                 Enabled = true,
                 Ipv6Enabled = true,
                 Name = "my-connection-group"
             });

             // Import the existing hosted zone info, replacing with your hostedZoneId and zoneName
             var hostedZoneId = "YOUR_HOSTED_ZONE_ID";
             var zoneName = "my.domain.com";
             var hostedZone = HostedZone.FromHostedZoneAttributes(this, "hosted-zone", new HostedZoneAttributes {
                 HostedZoneId = hostedZoneId,
                 ZoneName = zoneName
             });

             var record = new CnameRecord(this, "cname-record", new CnameRecordProps {
                 DomainName = connectionGroup.AttrRoutingEndpoint,
                 Zone = hostedZone,
                 RecordName = "cf-hosted-tenant.my.domain.com"
             });

             // Create the cloudfront-hosted tenant, passing in the previously created connection group
             var cloudfrontHostedTenant = new CfnDistributionTenant(this, "cf-hosted-tenant", new CfnDistributionTenantProps {
                 DistributionId = myMultiTenantDistribution.DistributionId,
                 Name = "cf-hosted-tenant",
                 Domains = new [] { "cf-hosted-tenant.my.domain.com" },
                 ConnectionGroupId = connectionGroup.AttrId,
                 Enabled = true,
                 ManagedCertificateRequest = new ManagedCertificateRequestProperty {
                     ValidationTokenHost = "cloudfront"
                 }
             });

Properties

AnycastIpListId

The ID of the Anycast static IP list.

public string? AnycastIpListId { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-anycastiplistid

Enabled

Whether the connection group is enabled.

public object? Enabled { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-enabled

Ipv6Enabled

IPv6 is enabled for the connection group.

public object? Ipv6Enabled { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-ipv6enabled

Name

The name of the connection group.

public string Name { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-name

Tags

A complex type that contains zero or more Tag elements.

public ICfnTag[]? Tags { get; set; }
Property Value

ICfnTag[]

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-connectiongroup.html#cfn-cloudfront-connectiongroup-tags

Implements

ICfnConnectionGroupProps
Back to top Generated by DocFX