Class Function
A CloudFront Function.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Function : Resource, IFunction, IResource
Syntax (vb)
Public Class Function
Inherits Resource
Implements IFunction, IResource
Remarks
Resource: AWS::CloudFront::Function
ExampleMetadata: infused
Examples
var store = new KeyValueStore(this, "KeyValueStore");
new Function(this, "Function", new FunctionProps {
Code = FunctionCode.FromInline("function handler(event) { return event.request }"),
// Note that JS_2_0 must be used for Key Value Store support
Runtime = FunctionRuntime.JS_2_0,
KeyValueStore = store
});
Synopsis
Constructors
Function(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Function(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Function(Construct, String, IFunctionProps) |
Properties
FunctionArn | the ARN of the CloudFront function. |
FunctionName | the name of the CloudFront function. |
FunctionRuntime | the runtime of the CloudFront function. |
FunctionStage | the deployment stage of the CloudFront function. |
Methods
FromFunctionAttributes(Construct, String, IFunctionAttributes) | Imports a function by its name and ARN. |
Constructors
Function(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Function(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Function(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Function(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Function(Construct, String, IFunctionProps)
public Function(Construct scope, string id, IFunctionProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IFunctionProps
Properties
FunctionArn
the ARN of the CloudFront function.
public virtual string FunctionArn { get; }
Property Value
System.String
Remarks
Attribute: true
FunctionName
the name of the CloudFront function.
public virtual string FunctionName { get; }
Property Value
System.String
Remarks
Attribute: true
FunctionRuntime
the runtime of the CloudFront function.
public virtual string FunctionRuntime { get; }
Property Value
System.String
Remarks
Attribute: true
FunctionStage
the deployment stage of the CloudFront function.
public virtual string FunctionStage { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
FromFunctionAttributes(Construct, String, IFunctionAttributes)
Imports a function by its name and ARN.
public static IFunction FromFunctionAttributes(Construct scope, string id, IFunctionAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IFunctionAttributes
Returns