Class FunctionUrlOriginAccessControl
An Origin Access Control for Lambda Function URLs.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionUrlOriginAccessControl : Resource, IOriginAccessControl, IResource
Syntax (vb)
Public Class FunctionUrlOriginAccessControl
Inherits Resource
Implements IOriginAccessControl, IResource
Remarks
Resource: AWS::CloudFront::OriginAccessControl
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
FunctionUrlOriginAccessControl(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FunctionUrlOriginAccessControl(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
FunctionUrlOriginAccessControl(Construct, String, IFunctionUrlOriginAccessControlProps) |
Properties
OriginAccessControlId | The unique identifier of this Origin Access Control. |
Methods
FromOriginAccessControlId(Construct, String, String) | Imports a Lambda Function URL origin access control from its id. |
Constructors
FunctionUrlOriginAccessControl(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FunctionUrlOriginAccessControl(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FunctionUrlOriginAccessControl(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FunctionUrlOriginAccessControl(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
FunctionUrlOriginAccessControl(Construct, String, IFunctionUrlOriginAccessControlProps)
public FunctionUrlOriginAccessControl(Construct scope, string id, IFunctionUrlOriginAccessControlProps props = null)
Parameters
- scope Constructs.Construct
- id System.String
- props IFunctionUrlOriginAccessControlProps
Properties
OriginAccessControlId
The unique identifier of this Origin Access Control.
public virtual string OriginAccessControlId { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
FromOriginAccessControlId(Construct, String, String)
Imports a Lambda Function URL origin access control from its id.
public static IOriginAccessControl FromOriginAccessControlId(Construct scope, string id, string originAccessControlId)
Parameters
- scope Constructs.Construct
- id System.String
- originAccessControlId System.String
Returns