Class KeyGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudfront.KeyGroup
- All Implemented Interfaces:
IKeyGroupRef,IEnvironmentAware,IResource,IKeyGroup,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:00.596Z")
@Stability(Stable)
public class KeyGroup
extends Resource
implements IKeyGroup
A Key Group configuration.
Example:
// Validating signed URLs or signed cookies with Trusted Key Groups
// public key in PEM format
String publicKey;
PublicKey pubKey = PublicKey.Builder.create(this, "MyPubKey")
.encodedKey(publicKey)
.build();
KeyGroup keyGroup = KeyGroup.Builder.create(this, "MyKeyGroup")
.items(List.of(pubKey))
.build();
Distribution.Builder.create(this, "Dist")
.defaultBehavior(BehaviorOptions.builder()
.origin(new HttpOrigin("www.example.com"))
.trustedKeyGroups(List.of(keyGroup))
.build())
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudfront.IKeyGroup
IKeyGroup.Jsii$Default, IKeyGroup.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKeyGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedKeyGroup(software.amazon.jsii.JsiiObjectRef objRef) KeyGroup(software.constructs.Construct scope, String id, KeyGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IKeyGroupfromKeyGroupId(software.constructs.Construct scope, String id, String keyGroupId) Imports a Key Group from its id.The ID of the key group.A reference to a KeyGroup resource.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.services.cloudfront.IKeyGroup
getEnv, getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
KeyGroup
protected KeyGroup(software.amazon.jsii.JsiiObjectRef objRef) -
KeyGroup
protected KeyGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
KeyGroup
@Stability(Stable) public KeyGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull KeyGroupProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromKeyGroupId
@Stability(Stable) @NotNull public static IKeyGroup fromKeyGroupId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String keyGroupId) Imports a Key Group from its id.- Parameters:
scope- This parameter is required.id- This parameter is required.keyGroupId- This parameter is required.
-
getKeyGroupId
The ID of the key group.- Specified by:
getKeyGroupIdin interfaceIKeyGroup
-
getKeyGroupRef
A reference to a KeyGroup resource.- Specified by:
getKeyGroupRefin interfaceIKeyGroupRef
-