Class FunctionUrl
Defines a Lambda function url.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionUrl : Resource, IFunctionUrl, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class FunctionUrl Inherits Resource Implements IFunctionUrl, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function fn;
var fnUrl = fn.AddFunctionUrl(new FunctionUrlOptions {
AuthType = FunctionUrlAuthType.AWS_IAM
});
new Distribution(this, "MyDistribution", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = FunctionUrlOrigin.WithOriginAccessControl(fnUrl)
}
});
Synopsis
Constructors
| FunctionUrl(Construct, string, IFunctionUrlProps) | Defines a Lambda function url. |
Properties
| AuthType | The authentication type used for this Function URL. |
| FunctionArn | The ARN of the function this URL refers to. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
| Url | The url of the Lambda function. |
Methods
| GrantInvokeUrl(IGrantable) | Grant the given identity permissions to invoke this Lambda Function URL. |
Constructors
FunctionUrl(Construct, string, IFunctionUrlProps)
Defines a Lambda function url.
public FunctionUrl(Construct scope, string id, IFunctionUrlProps props)
Parameters
- scope Construct
- id string
- props IFunctionUrlProps
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda;
Function fn;
var fnUrl = fn.AddFunctionUrl(new FunctionUrlOptions {
AuthType = FunctionUrlAuthType.AWS_IAM
});
new Distribution(this, "MyDistribution", new DistributionProps {
DefaultBehavior = new BehaviorOptions {
Origin = FunctionUrlOrigin.WithOriginAccessControl(fnUrl)
}
});
Properties
AuthType
The authentication type used for this Function URL.
public virtual FunctionUrlAuthType AuthType { get; }
Property Value
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
FunctionArn
The ARN of the function this URL refers to.
public virtual string FunctionArn { get; }
Property Value
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
Url
The url of the Lambda function.
public virtual string Url { get; }
Property Value
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused
Methods
GrantInvokeUrl(IGrantable)
Grant the given identity permissions to invoke this Lambda Function URL.
public virtual Grant GrantInvokeUrl(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
Remarks
Resource: AWS::Lambda::Url
ExampleMetadata: infused