Show / Hide Table of Contents

Class CfnFunction

Creates a CloudFront function.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnFunction
Implements
IInspectable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnFunction : CfnResource, IInspectable
Syntax (vb)
Public Class CfnFunction Inherits CfnResource Implements IInspectable
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"
                 }
             });

Synopsis

Constructors

CfnFunction(Construct, string, ICfnFunctionProps)

Creates a CloudFront function.

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 LIVE stage when it’s created.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Creates a CloudFront function.

FunctionCode

The function code.

FunctionConfig

Contains configuration information about a CloudFront function.

FunctionMetadata

Contains metadata about a CloudFront function.

Name

A name to identify the function.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

Creates a CloudFront function.

Constructors

CfnFunction(Construct, string, ICfnFunctionProps)

Creates a 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

string

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

string

Remarks

The ARN uniquely identifies the function.

CloudformationAttribute: FunctionMetadata.FunctionARN

AttrStage

Creates a CloudFront function.

public virtual string AttrStage { get; }
Property Value

string

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

object

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

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

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

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
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

string

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

object

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

FunctionMetadata

Contains metadata about a CloudFront function.

public virtual object? FunctionMetadata { get; set; }
Property Value

object

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

string

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

Methods

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

RenderProperties(IDictionary<string, object>)

Creates a CloudFront function.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
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

Implements

IInspectable
Back to top Generated by DocFX