Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Deprecated: aws.cloudtrail.getFunction has been deprecated in favor of aws.cloudfront.getFunction
Provides information about a CloudFront Function.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var functionName = config.Require("functionName");
var existing = Aws.CloudFront.GetFunction.Invoke(new()
{
Name = functionName,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
functionName := cfg.Require("functionName")
_, err := cloudfront.LookupFunction(ctx, &cloudfront.LookupFunctionArgs{
Name: functionName,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetFunctionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var functionName = config.get("functionName");
final var existing = CloudfrontFunctions.getFunction(GetFunctionArgs.builder()
.name(functionName)
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const functionName = config.require("functionName");
const existing = aws.cloudfront.getFunction({
name: functionName,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
function_name = config.require("functionName")
existing = aws.cloudfront.get_function(name=function_name)
configuration:
functionName:
type: string
variables:
existing:
fn::invoke:
Function: aws:cloudfront:getFunction
Arguments:
name: ${functionName}
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(name: Optional[str] = None,
stage: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFunctionResult
def get_function_output(name: Optional[pulumi.Input[str]] = None,
stage: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFunctionResult]func GetFunction(ctx *Context, args *GetFunctionArgs, opts ...InvokeOption) (*GetFunctionResult, error)
func GetFunctionOutput(ctx *Context, args *GetFunctionOutputArgs, opts ...InvokeOption) GetFunctionResultOutput> Note: This function is named GetFunction 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:cloudtrail/getFunction:getFunction
arguments:
# arguments dictionaryThe following arguments are supported:
getFunction Result
The following output properties are available:
- Arn string
- ARN identifying your CloudFront Function.
- Code string
- Source code of the function
- Comment string
- Comment.
- Etag string
- ETag hash of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - When this resource was last modified.
- Name string
- Runtime string
- Identifier of the function's runtime.
- Stage string
- Status string
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
- Arn string
- ARN identifying your CloudFront Function.
- Code string
- Source code of the function
- Comment string
- Comment.
- Etag string
- ETag hash of the function
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - When this resource was last modified.
- Name string
- Runtime string
- Identifier of the function's runtime.
- Stage string
- Status string
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
- arn String
- ARN identifying your CloudFront Function.
- code String
- Source code of the function
- comment String
- Comment.
- etag String
- ETag hash of the function
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - When this resource was last modified.
- name String
- runtime String
- Identifier of the function's runtime.
- stage String
- status String
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
- arn string
- ARN identifying your CloudFront Function.
- code string
- Source code of the function
- comment string
- Comment.
- etag string
- ETag hash of the function
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - When this resource was last modified.
- name string
- runtime string
- Identifier of the function's runtime.
- stage string
- status string
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
- arn str
- ARN identifying your CloudFront Function.
- code str
- Source code of the function
- comment str
- Comment.
- etag str
- ETag hash of the function
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - When this resource was last modified.
- name str
- runtime str
- Identifier of the function's runtime.
- stage str
- status str
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
- arn String
- ARN identifying your CloudFront Function.
- code String
- Source code of the function
- comment String
- Comment.
- etag String
- ETag hash of the function
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - When this resource was last modified.
- name String
- runtime String
- Identifier of the function's runtime.
- stage String
- status String
- Status of the function. Can be
UNPUBLISHED,UNASSOCIATEDorASSOCIATED.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
