Show / Hide Table of Contents

Class FunctionUrlOriginAccessControlProps

Properties for creating a Lambda Function URL Origin Access Control resource.

Inheritance
object
FunctionUrlOriginAccessControlProps
Implements
IFunctionUrlOriginAccessControlProps
IOriginAccessControlBaseProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionUrlOriginAccessControlProps : IFunctionUrlOriginAccessControlProps, IOriginAccessControlBaseProps
Syntax (vb)
Public Class FunctionUrlOriginAccessControlProps 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

FunctionUrlOriginAccessControlProps()

Properties for creating a Lambda Function URL Origin Access Control resource.

Properties

Description

A description of the origin access control.

OriginAccessControlName

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()

Properties for creating a Lambda Function URL Origin Access Control resource.

public FunctionUrlOriginAccessControlProps()
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
                    })
                }
            });

Properties

Description

A description of the origin access control.

public string? Description { get; set; }
Property Value

string

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

string

Remarks

Default: - a generated name

Signing

Specifies which requests CloudFront signs and the signing protocol.

public Signing? Signing { get; set; }
Property Value

Signing

Remarks

Default: SIGV4_ALWAYS

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-originaccesscontrol-originaccesscontrolconfig.html#cfn-cloudfront-originaccesscontrol-originaccesscontrolconfig-signingbehavior

Implements

IFunctionUrlOriginAccessControlProps
IOriginAccessControlBaseProps
Back to top Generated by DocFX