Class CfnFunction
Creates a CloudFront function.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnFunction : CfnResource, IInspectable, IFunctionRef, IConstruct, IDependable, IEnvironmentAware, ITaggableV2
Syntax (vb)
Public Class CfnFunction Inherits CfnResource Implements IInspectable, IFunctionRef, IConstruct, IDependable, IEnvironmentAware, ITaggableV2
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
var cfnFunction = new CfnFunction(this, "MyCfnFunction", new CfnFunctionProps {
FunctionCode = "functionCode",
FunctionConfig = new FunctionConfigProperty {
Comment = "comment",
Runtime = "runtime",
// the properties below are optional
KeyValueStoreAssociations = new [] { new KeyValueStoreAssociationProperty {
KeyValueStoreArn = "keyValueStoreArn"
} }
},
Name = "name",
// the properties below are optional
AutoPublish = false,
FunctionMetadata = new FunctionMetadataProperty {
FunctionArn = "functionArn"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
| CfnFunction(Construct, string, ICfnFunctionProps) | Create a new |
Properties
| AttrFunctionArn | The ARN of the function. For example:. |
| AttrFunctionMetadataFunctionArn | The Amazon Resource Name (ARN) of the function. |
| AttrStage | Creates a CloudFront function. |
| AutoPublish | A flag that determines whether to automatically publish the function to the |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CdkTagManager | Tag Manager which manages the tags for this resource. |
| CfnProperties | Creates a CloudFront function. |
| CfnPropertyNames | Creates a CloudFront function. |
| FunctionCode | The function code. |
| FunctionConfig | Contains configuration information about a CloudFront function. |
| FunctionMetadata | Contains metadata about a CloudFront function. |
| FunctionRef | A reference to a Function resource. |
| Name | A name to identify the function. |
| Tags | Creates a CloudFront function. |
Methods
| ArnForFunction(IFunctionRef) | Creates a CloudFront function. |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnFunction(object) | Checks whether the given object is a CfnFunction. |
| RenderProperties(IDictionary<string, object>) | Creates a CloudFront function. |
Constructors
CfnFunction(Construct, string, ICfnFunctionProps)
Create a new AWS::CloudFront::Function.
public CfnFunction(Construct scope, string id, ICfnFunctionProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnFunctionProps
Resource properties.
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Properties
AttrFunctionArn
The ARN of the function. For example:.
public virtual string AttrFunctionArn { get; }
Property Value
Remarks
arn:aws:cloudfront::123456789012:function/ExampleFunction .
To get the function ARN, use the following syntax:
!GetAtt Function_Logical_ID .FunctionMetadata.FunctionARN
CloudformationAttribute: FunctionARN
AttrFunctionMetadataFunctionArn
The Amazon Resource Name (ARN) of the function.
public virtual string AttrFunctionMetadataFunctionArn { get; }
Property Value
Remarks
The ARN uniquely identifies the function.
CloudformationAttribute: FunctionMetadata.FunctionARN
AttrStage
Creates a CloudFront function.
public virtual string AttrStage { get; }
Property Value
Remarks
CloudformationAttribute: Stage
AutoPublish
A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.
public virtual object? AutoPublish { get; set; }
Property Value
Remarks
Type union: either bool or IResolvable
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
CfnProperties
Creates a CloudFront function.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
CfnPropertyNames
Creates a CloudFront function.
protected override IDictionary<string, string> CfnPropertyNames { get; }
Property Value
Overrides
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
FunctionCode
The function code.
public virtual string FunctionCode { get; set; }
Property Value
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
FunctionConfig
Contains configuration information about a CloudFront function.
public virtual object FunctionConfig { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnFunction.IFunctionConfigProperty
FunctionMetadata
Contains metadata about a CloudFront function.
public virtual object? FunctionMetadata { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnFunction.IFunctionMetadataProperty
FunctionRef
A reference to a Function resource.
public virtual IFunctionReference FunctionRef { get; }
Property Value
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Name
A name to identify the function.
public virtual string Name { get; set; }
Property Value
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Tags
Creates a CloudFront function.
public virtual ICfnTag[]? Tags { get; set; }
Property Value
ICfnTag[]
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
var cfnFunction = new CfnFunction(this, "MyCfnFunction", new CfnFunctionProps {
FunctionCode = "functionCode",
FunctionConfig = new FunctionConfigProperty {
Comment = "comment",
Runtime = "runtime",
// the properties below are optional
KeyValueStoreAssociations = new [] { new KeyValueStoreAssociationProperty {
KeyValueStoreArn = "keyValueStoreArn"
} }
},
Name = "name",
// the properties below are optional
AutoPublish = false,
FunctionMetadata = new FunctionMetadataProperty {
FunctionArn = "functionArn"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Methods
ArnForFunction(IFunctionRef)
Creates a CloudFront function.
public static string ArnForFunction(IFunctionRef resource)
Parameters
- resource IFunctionRef
Returns
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
var cfnFunction = new CfnFunction(this, "MyCfnFunction", new CfnFunctionProps {
FunctionCode = "functionCode",
FunctionConfig = new FunctionConfigProperty {
Comment = "comment",
Runtime = "runtime",
// the properties below are optional
KeyValueStoreAssociations = new [] { new KeyValueStoreAssociationProperty {
KeyValueStoreArn = "keyValueStoreArn"
} }
},
Name = "name",
// the properties below are optional
AutoPublish = false,
FunctionMetadata = new FunctionMetadataProperty {
FunctionArn = "functionArn"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
IsCfnFunction(object)
Checks whether the given object is a CfnFunction.
public static bool IsCfnFunction(object x)
Parameters
- x object
Returns
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates a CloudFront function.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
To create a function, you provide the function code and some configuration information about the function. The response contains an Amazon Resource Name (ARN) that uniquely identifies the function, and the function’s stage.
By default, when you create a function, it’s in the DEVELOPMENT stage. In this stage, you can test the function in the CloudFront console (or with TestFunction in the CloudFront API).
When you’re ready to use your function with a CloudFront distribution, publish the function to the LIVE stage. You can do this in the CloudFront console, with PublishFunction in the CloudFront API, or by updating the AWS::CloudFront::Function resource with the AutoPublish property set to true . When the function is published to the LIVE stage, you can attach it to a distribution’s cache behavior, using the function’s ARN.
To automatically publish the function to the LIVE stage when it’s created, set the AutoPublish property to true .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-function.html
CloudformationResource: AWS::CloudFront::Function
ExampleMetadata: fixture=_generated