Show / Hide Table of Contents

Class KeyGroup

A Key Group configuration.

Inheritance
object
Resource
KeyGroup
Implements
IKeyGroup
IResource
IKeyGroupRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class KeyGroup : Resource, IKeyGroup, IResource, IKeyGroupRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class KeyGroup Inherits Resource Implements IKeyGroup, IResource, IKeyGroupRef, IConstruct, IDependable, IEnvironmentAware
Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

Examples
// Validating signed URLs or signed cookies with Trusted Key Groups

             // public key in PEM format
             string publicKey;

             var pubKey = new PublicKey(this, "MyPubKey", new PublicKeyProps {
                 EncodedKey = publicKey
             });

             var keyGroup = new KeyGroup(this, "MyKeyGroup", new KeyGroupProps {
                 Items = new [] { pubKey }
             });

             new Distribution(this, "Dist", new DistributionProps {
                 DefaultBehavior = new BehaviorOptions {
                     Origin = new HttpOrigin("www.example.com"),
                     TrustedKeyGroups = new [] { keyGroup }
                 }
             });

Synopsis

Constructors

KeyGroup(Construct, string, IKeyGroupProps)

A Key Group configuration.

Properties

KeyGroupId

The ID of the key group.

KeyGroupRef

A reference to a KeyGroup resource.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

FromKeyGroupId(Construct, string, string)

Imports a Key Group from its id.

Constructors

KeyGroup(Construct, string, IKeyGroupProps)

A Key Group configuration.

public KeyGroup(Construct scope, string id, IKeyGroupProps props)
Parameters
scope Construct
id string
props IKeyGroupProps
Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

Examples
// Validating signed URLs or signed cookies with Trusted Key Groups

             // public key in PEM format
             string publicKey;

             var pubKey = new PublicKey(this, "MyPubKey", new PublicKeyProps {
                 EncodedKey = publicKey
             });

             var keyGroup = new KeyGroup(this, "MyKeyGroup", new KeyGroupProps {
                 Items = new [] { pubKey }
             });

             new Distribution(this, "Dist", new DistributionProps {
                 DefaultBehavior = new BehaviorOptions {
                     Origin = new HttpOrigin("www.example.com"),
                     TrustedKeyGroups = new [] { keyGroup }
                 }
             });

Properties

KeyGroupId

The ID of the key group.

public virtual string KeyGroupId { get; }
Property Value

string

Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

KeyGroupRef

A reference to a KeyGroup resource.

public virtual IKeyGroupReference KeyGroupRef { get; }
Property Value

IKeyGroupReference

Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

Methods

FromKeyGroupId(Construct, string, string)

Imports a Key Group from its id.

public static IKeyGroup FromKeyGroupId(Construct scope, string id, string keyGroupId)
Parameters
scope Construct
id string
keyGroupId string
Returns

IKeyGroup

Remarks

Resource: AWS::CloudFront::KeyGroup

ExampleMetadata: infused

Implements

IKeyGroup
IResource
IKeyGroupRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX