Class FunctionUrlOriginAccessControl
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudfront.FunctionUrlOriginAccessControl
- All Implemented Interfaces:
IResource,IOriginAccessControl,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:34.339Z")
@Stability(Stable)
public class FunctionUrlOriginAccessControl
extends Resource
implements IOriginAccessControl
An Origin Access Control for Lambda Function URLs.
Example:
import software.amazon.awscdk.services.lambda.*;
Function fn;
FunctionUrl fnUrl = fn.addFunctionUrl(FunctionUrlOptions.builder()
.authType(FunctionUrlAuthType.AWS_IAM)
.build());
// Define a custom OAC
FunctionUrlOriginAccessControl oac = FunctionUrlOriginAccessControl.Builder.create(this, "MyOAC")
.originAccessControlName("CustomLambdaOAC")
.signing(Signing.SIGV4_ALWAYS)
.build();
// Set up Lambda Function URL with OAC in CloudFront Distribution
// Set up Lambda Function URL with OAC in CloudFront Distribution
Distribution.Builder.create(this, "MyDistribution")
.defaultBehavior(BehaviorOptions.builder()
.origin(FunctionUrlOrigin.withOriginAccessControl(fnUrl, FunctionUrlOriginWithOACProps.builder()
.originAccessControl(oac)
.build()))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forFunctionUrlOriginAccessControl.Nested 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.IOriginAccessControl
IOriginAccessControl.Jsii$Default, IOriginAccessControl.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFunctionUrlOriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFunctionUrlOriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef) FunctionUrlOriginAccessControl(software.constructs.Construct scope, String id) FunctionUrlOriginAccessControl(software.constructs.Construct scope, String id, FunctionUrlOriginAccessControlProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IOriginAccessControlfromOriginAccessControlId(software.constructs.Construct scope, String id, String originAccessControlId) Imports a Lambda Function URL origin access control from its id.The unique identifier of this Origin Access Control.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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
FunctionUrlOriginAccessControl
protected FunctionUrlOriginAccessControl(software.amazon.jsii.JsiiObjectRef objRef) -
FunctionUrlOriginAccessControl
protected FunctionUrlOriginAccessControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FunctionUrlOriginAccessControl
@Stability(Stable) public FunctionUrlOriginAccessControl(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable FunctionUrlOriginAccessControlProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
FunctionUrlOriginAccessControl
@Stability(Stable) public FunctionUrlOriginAccessControl(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromOriginAccessControlId
@Stability(Stable) @NotNull public static IOriginAccessControl fromOriginAccessControlId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String originAccessControlId) Imports a Lambda Function URL origin access control from its id.- Parameters:
scope- This parameter is required.id- This parameter is required.originAccessControlId- This parameter is required.
-
getOriginAccessControlId
The unique identifier of this Origin Access Control.- Specified by:
getOriginAccessControlIdin interfaceIOriginAccessControl
-