Class FunctionUrlOriginAccessControlProps
Properties for creating a Lambda Function URL Origin Access Control resource.
Inheritance
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionUrlOriginAccessControlProps : Object, IFunctionUrlOriginAccessControlProps, IOriginAccessControlBaseProps
Syntax (vb)
Public Class FunctionUrlOriginAccessControlProps
Inherits Object
Implements IFunctionUrlOriginAccessControlProps, IOriginAccessControlBaseProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function fn;
var fnUrl = fn.AddFunctionUrl(new FunctionUrlOptions {
AuthType = FunctionUrlAuthType.AWS_IAM
});
// Define a custom OAC
var oac = new FunctionUrlOriginAccessControl(this, "MyOAC", new FunctionUrlOriginAccessControlProps {
OriginAccessControlName = "CustomLambdaOAC",
Signing = Signing.SIGV4_ALWAYS
});
// Set up Lambda Function URL with OAC in CloudFront Distribution
// Set up Lambda Function URL with OAC in CloudFront Distribution
new Distribution(this, "MyDistribution", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = FunctionUrlOrigin.WithOriginAccessControl(fnUrl, new FunctionUrlOriginWithOACProps {
OriginAccessControl = oac
})
}
});
Synopsis
Constructors
Function |
Properties
Description | A description of the origin access control. |
Origin |
A name to identify the origin access control, with a maximum length of 64 characters. |
Signing | Specifies which requests CloudFront signs and the signing protocol. |
Constructors
FunctionUrlOriginAccessControlProps()
public FunctionUrlOriginAccessControlProps()
Properties
Description
A description of the origin access control.
public string Description { get; set; }
Property Value
System.
Remarks
Default: - no description
OriginAccessControlName
A name to identify the origin access control, with a maximum length of 64 characters.
public string OriginAccessControlName { get; set; }
Property Value
System.
Remarks
Default: - a generated name
Signing
Specifies which requests CloudFront signs and the signing protocol.
public Signing Signing { get; set; }
Property Value