We recommend new projects start with resources from the AWS provider.
aws-native.cloudfront.getFunction
We recommend new projects start with resources from the AWS provider.
Creates a CF function.
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 CF console (or with TestFunction in the CF API).
When you’re ready to use your function with a CF distribution, publish the function to the LIVE stage. You can do this in the CF console, with PublishFunction in the CF 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.
Using getFunction
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFunction(args: GetFunctionArgs, opts?: InvokeOptions): Promise<GetFunctionResult>
function getFunctionOutput(args: GetFunctionOutputArgs, opts?: InvokeOptions): Output<GetFunctionResult>def get_function(function_arn: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetFunctionResult
def get_function_output(function_arn: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetFunctionResult]func LookupFunction(ctx *Context, args *LookupFunctionArgs, opts ...InvokeOption) (*LookupFunctionResult, error)
func LookupFunctionOutput(ctx *Context, args *LookupFunctionOutputArgs, opts ...InvokeOption) LookupFunctionResultOutput> Note: This function is named LookupFunction in the Go SDK.
public static class GetFunction 
{
    public static Task<GetFunctionResult> InvokeAsync(GetFunctionArgs args, InvokeOptions? opts = null)
    public static Output<GetFunctionResult> Invoke(GetFunctionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFunctionResult> getFunction(GetFunctionArgs args, InvokeOptions options)
public static Output<GetFunctionResult> getFunction(GetFunctionArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:cloudfront:getFunction
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FunctionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- FunctionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionArn String
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- function_arn str
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionArn String
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
getFunction Result
The following output properties are available:
- FunctionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- FunctionCode string
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- FunctionConfig Pulumi.Aws Native. Cloud Front. Outputs. Function Config 
- Contains configuration information about a CloudFront function.
- FunctionMetadata Pulumi.Aws Native. Cloud Front. Outputs. Function Metadata 
- Contains metadata about a CloudFront function.
- Stage string
- FunctionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- FunctionCode string
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- FunctionConfig FunctionConfig 
- Contains configuration information about a CloudFront function.
- FunctionMetadata FunctionMetadata 
- Contains metadata about a CloudFront function.
- Stage string
- functionArn String
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionCode String
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- functionConfig FunctionConfig 
- Contains configuration information about a CloudFront function.
- functionMetadata FunctionMetadata 
- Contains metadata about a CloudFront function.
- stage String
- functionArn string
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionCode string
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- functionConfig FunctionConfig 
- Contains configuration information about a CloudFront function.
- functionMetadata FunctionMetadata 
- Contains metadata about a CloudFront function.
- stage string
- function_arn str
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- function_code str
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- function_config FunctionConfig 
- Contains configuration information about a CloudFront function.
- function_metadata FunctionMetadata 
- Contains metadata about a CloudFront function.
- stage str
- functionArn String
- The ARN of the function. For example: - arn:aws:cloudfront::123456789012:function/ExampleFunction.- To get the function ARN, use the following syntax: - !GetAtt *Function_Logical_ID* .FunctionMetadata.FunctionARN
- functionCode String
- The function code. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide.
- functionConfig Property Map
- Contains configuration information about a CloudFront function.
- functionMetadata Property Map
- Contains metadata about a CloudFront function.
- stage String
Supporting Types
FunctionConfig 
- Comment string
- A comment to describe the function.
- Runtime string
- The function's runtime environment version.
- KeyValue List<Pulumi.Store Associations Aws Native. Cloud Front. Inputs. Function Key Value Store Association> 
- The configuration for the key value store associations.
- Comment string
- A comment to describe the function.
- Runtime string
- The function's runtime environment version.
- KeyValue []FunctionStore Associations Key Value Store Association 
- The configuration for the key value store associations.
- comment String
- A comment to describe the function.
- runtime String
- The function's runtime environment version.
- keyValue List<FunctionStore Associations Key Value Store Association> 
- The configuration for the key value store associations.
- comment string
- A comment to describe the function.
- runtime string
- The function's runtime environment version.
- keyValue FunctionStore Associations Key Value Store Association[] 
- The configuration for the key value store associations.
- comment str
- A comment to describe the function.
- runtime str
- The function's runtime environment version.
- key_value_ Sequence[Functionstore_ associations Key Value Store Association] 
- The configuration for the key value store associations.
- comment String
- A comment to describe the function.
- runtime String
- The function's runtime environment version.
- keyValue List<Property Map>Store Associations 
- The configuration for the key value store associations.
FunctionKeyValueStoreAssociation    
- KeyValue stringStore Arn 
- The Amazon Resource Name (ARN) of the key value store association.
- KeyValue stringStore Arn 
- The Amazon Resource Name (ARN) of the key value store association.
- keyValue StringStore Arn 
- The Amazon Resource Name (ARN) of the key value store association.
- keyValue stringStore Arn 
- The Amazon Resource Name (ARN) of the key value store association.
- key_value_ strstore_ arn 
- The Amazon Resource Name (ARN) of the key value store association.
- keyValue StringStore Arn 
- The Amazon Resource Name (ARN) of the key value store association.
FunctionMetadata 
- FunctionArn string
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
- FunctionArn string
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
- functionArn String
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
- functionArn string
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
- function_arn str
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
- functionArn String
- The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
