Class KeyGroup
A Key Group configuration.
Inherited Members
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
Remarks
Resource: AWS::CloudFront::KeyGroup
ExampleMetadata: infused
KeyGroupRef
A reference to a KeyGroup resource.
public virtual IKeyGroupReference KeyGroupRef { get; }
Property Value
Remarks
Resource: AWS::CloudFront::KeyGroup
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
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
Returns
Remarks
Resource: AWS::CloudFront::KeyGroup
ExampleMetadata: infused
Implements
Constructs.IConstruct
Constructs.IDependable