Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

Function

This resource provides the Function resource in Oracle Cloud Infrastructure Functions service.

Creates a new function.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testFunction = new Oci.Functions.Function("testFunction", new()
    {
        ApplicationId = oci_functions_application.Test_application.Id,
        DisplayName = @var.Function_display_name,
        Image = @var.Function_image,
        MemoryInMbs = @var.Function_memory_in_mbs,
        Config = @var.Function_config,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
        ImageDigest = @var.Function_image_digest,
        ProvisionedConcurrencyConfig = new Oci.Functions.Inputs.FunctionProvisionedConcurrencyConfigArgs
        {
            Strategy = @var.Function_provisioned_concurrency_config_strategy,
            Count = @var.Function_provisioned_concurrency_config_count,
        },
        TimeoutInSeconds = @var.Function_timeout_in_seconds,
        TraceConfig = new Oci.Functions.Inputs.FunctionTraceConfigArgs
        {
            IsEnabled = @var.Function_trace_config_is_enabled,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Functions"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Functions.NewFunction(ctx, "testFunction", &Functions.FunctionArgs{
			ApplicationId: pulumi.Any(oci_functions_application.Test_application.Id),
			DisplayName:   pulumi.Any(_var.Function_display_name),
			Image:         pulumi.Any(_var.Function_image),
			MemoryInMbs:   pulumi.Any(_var.Function_memory_in_mbs),
			Config:        pulumi.Any(_var.Function_config),
			DefinedTags: pulumi.AnyMap{
				"Operations.CostCenter": pulumi.Any("42"),
			},
			FreeformTags: pulumi.AnyMap{
				"Department": pulumi.Any("Finance"),
			},
			ImageDigest: pulumi.Any(_var.Function_image_digest),
			ProvisionedConcurrencyConfig: &functions.FunctionProvisionedConcurrencyConfigArgs{
				Strategy: pulumi.Any(_var.Function_provisioned_concurrency_config_strategy),
				Count:    pulumi.Any(_var.Function_provisioned_concurrency_config_count),
			},
			TimeoutInSeconds: pulumi.Any(_var.Function_timeout_in_seconds),
			TraceConfig: &functions.FunctionTraceConfigArgs{
				IsEnabled: pulumi.Any(_var.Function_trace_config_is_enabled),
			},
		})
		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.oci.Functions.Function;
import com.pulumi.oci.Functions.FunctionArgs;
import com.pulumi.oci.Functions.inputs.FunctionProvisionedConcurrencyConfigArgs;
import com.pulumi.oci.Functions.inputs.FunctionTraceConfigArgs;
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) {
        var testFunction = new Function("testFunction", FunctionArgs.builder()        
            .applicationId(oci_functions_application.test_application().id())
            .displayName(var_.function_display_name())
            .image(var_.function_image())
            .memoryInMbs(var_.function_memory_in_mbs())
            .config(var_.function_config())
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .freeformTags(Map.of("Department", "Finance"))
            .imageDigest(var_.function_image_digest())
            .provisionedConcurrencyConfig(FunctionProvisionedConcurrencyConfigArgs.builder()
                .strategy(var_.function_provisioned_concurrency_config_strategy())
                .count(var_.function_provisioned_concurrency_config_count())
                .build())
            .timeoutInSeconds(var_.function_timeout_in_seconds())
            .traceConfig(FunctionTraceConfigArgs.builder()
                .isEnabled(var_.function_trace_config_is_enabled())
                .build())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_function = oci.functions.Function("testFunction",
    application_id=oci_functions_application["test_application"]["id"],
    display_name=var["function_display_name"],
    image=var["function_image"],
    memory_in_mbs=var["function_memory_in_mbs"],
    config=var["function_config"],
    defined_tags={
        "Operations.CostCenter": "42",
    },
    freeform_tags={
        "Department": "Finance",
    },
    image_digest=var["function_image_digest"],
    provisioned_concurrency_config=oci.functions.FunctionProvisionedConcurrencyConfigArgs(
        strategy=var["function_provisioned_concurrency_config_strategy"],
        count=var["function_provisioned_concurrency_config_count"],
    ),
    timeout_in_seconds=var["function_timeout_in_seconds"],
    trace_config=oci.functions.FunctionTraceConfigArgs(
        is_enabled=var["function_trace_config_is_enabled"],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testFunction = new oci.functions.Function("testFunction", {
    applicationId: oci_functions_application.test_application.id,
    displayName: _var.function_display_name,
    image: _var.function_image,
    memoryInMbs: _var.function_memory_in_mbs,
    config: _var.function_config,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    freeformTags: {
        Department: "Finance",
    },
    imageDigest: _var.function_image_digest,
    provisionedConcurrencyConfig: {
        strategy: _var.function_provisioned_concurrency_config_strategy,
        count: _var.function_provisioned_concurrency_config_count,
    },
    timeoutInSeconds: _var.function_timeout_in_seconds,
    traceConfig: {
        isEnabled: _var.function_trace_config_is_enabled,
    },
});
resources:
  testFunction:
    type: oci:Functions:Function
    properties:
      #Required
      applicationId: ${oci_functions_application.test_application.id}
      displayName: ${var.function_display_name}
      image: ${var.function_image}
      memoryInMbs: ${var.function_memory_in_mbs}
      #Optional
      config: ${var.function_config}
      definedTags:
        Operations.CostCenter: 42
      freeformTags:
        Department: Finance
      imageDigest: ${var.function_image_digest}
      provisionedConcurrencyConfig:
        strategy: ${var.function_provisioned_concurrency_config_strategy}
        count: ${var.function_provisioned_concurrency_config_count}
      timeoutInSeconds: ${var.function_timeout_in_seconds}
      traceConfig:
        isEnabled: ${var.function_trace_config_is_enabled}

Create Function Resource

new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
@overload
def Function(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             application_id: Optional[str] = None,
             config: Optional[Mapping[str, Any]] = None,
             defined_tags: Optional[Mapping[str, Any]] = None,
             display_name: Optional[str] = None,
             freeform_tags: Optional[Mapping[str, Any]] = None,
             image: Optional[str] = None,
             image_digest: Optional[str] = None,
             memory_in_mbs: Optional[str] = None,
             provisioned_concurrency_config: Optional[_functions.FunctionProvisionedConcurrencyConfigArgs] = None,
             timeout_in_seconds: Optional[int] = None,
             trace_config: Optional[_functions.FunctionTraceConfigArgs] = None)
@overload
def Function(resource_name: str,
             args: FunctionArgs,
             opts: Optional[ResourceOptions] = None)
func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
public Function(String name, FunctionArgs args)
public Function(String name, FunctionArgs args, CustomResourceOptions options)
type: oci:Functions:Function
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FunctionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FunctionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FunctionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FunctionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FunctionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Function Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Function resource accepts the following input properties:

ApplicationId string

The OCID of the application this function belongs to.

DisplayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

Image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

MemoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

Config Dictionary<string, object>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

FreeformTags Dictionary<string, object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

ImageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

ProvisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

TimeoutInSeconds int

(Updatable) Timeout for executions of the function. Value in seconds.

TraceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

ApplicationId string

The OCID of the application this function belongs to.

DisplayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

Image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

MemoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

Config map[string]interface{}

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

FreeformTags map[string]interface{}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

ImageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

ProvisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

TimeoutInSeconds int

(Updatable) Timeout for executions of the function. Value in seconds.

TraceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId String

The OCID of the application this function belongs to.

displayName String

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

image String

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

memoryInMbs String

(Updatable) Maximum usable memory for the function (MiB).

config Map<String,Object>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

freeformTags Map<String,Object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

imageDigest String

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

provisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

timeoutInSeconds Integer

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId string

The OCID of the application this function belongs to.

displayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

memoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

config {[key: string]: any}

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

freeformTags {[key: string]: any}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

imageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

provisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

timeoutInSeconds number

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

application_id str

The OCID of the application this function belongs to.

display_name str

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

image str

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

memory_in_mbs str

(Updatable) Maximum usable memory for the function (MiB).

config Mapping[str, Any]

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

freeform_tags Mapping[str, Any]

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

image_digest str

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

provisioned_concurrency_config FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

timeout_in_seconds int

(Updatable) Timeout for executions of the function. Value in seconds.

trace_config FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId String

The OCID of the application this function belongs to.

displayName String

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

image String

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

memoryInMbs String

(Updatable) Maximum usable memory for the function (MiB).

config Map<Any>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

freeformTags Map<Any>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

imageDigest String

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

provisionedConcurrencyConfig Property Map

(Updatable) Define the strategy for provisioned concurrency for the function.

timeoutInSeconds Number

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig Property Map

(Updatable) Define the tracing configuration for a function.

Outputs

All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:

CompartmentId string

The OCID of the compartment that contains the function.

Id string

The provider-assigned unique ID for this managed resource.

InvokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

State string

The current state of the function.

TimeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

CompartmentId string

The OCID of the compartment that contains the function.

Id string

The provider-assigned unique ID for this managed resource.

InvokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

State string

The current state of the function.

TimeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

compartmentId String

The OCID of the compartment that contains the function.

id String

The provider-assigned unique ID for this managed resource.

invokeEndpoint String

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

state String

The current state of the function.

timeCreated String

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated String

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

compartmentId string

The OCID of the compartment that contains the function.

id string

The provider-assigned unique ID for this managed resource.

invokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

state string

The current state of the function.

timeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

compartment_id str

The OCID of the compartment that contains the function.

id str

The provider-assigned unique ID for this managed resource.

invoke_endpoint str

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

state str

The current state of the function.

time_created str

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

time_updated str

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

compartmentId String

The OCID of the compartment that contains the function.

id String

The provider-assigned unique ID for this managed resource.

invokeEndpoint String

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

state String

The current state of the function.

timeCreated String

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated String

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

Look up Existing Function Resource

Get an existing Function resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FunctionState, opts?: CustomResourceOptions): Function
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        compartment_id: Optional[str] = None,
        config: Optional[Mapping[str, Any]] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        image: Optional[str] = None,
        image_digest: Optional[str] = None,
        invoke_endpoint: Optional[str] = None,
        memory_in_mbs: Optional[str] = None,
        provisioned_concurrency_config: Optional[_functions.FunctionProvisionedConcurrencyConfigArgs] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None,
        timeout_in_seconds: Optional[int] = None,
        trace_config: Optional[_functions.FunctionTraceConfigArgs] = None) -> Function
func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)
public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)
public static Function get(String name, Output<String> id, FunctionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApplicationId string

The OCID of the application this function belongs to.

CompartmentId string

The OCID of the compartment that contains the function.

Config Dictionary<string, object>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

FreeformTags Dictionary<string, object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

ImageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

InvokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

MemoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

ProvisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

State string

The current state of the function.

TimeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeoutInSeconds int

(Updatable) Timeout for executions of the function. Value in seconds.

TraceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

ApplicationId string

The OCID of the application this function belongs to.

CompartmentId string

The OCID of the compartment that contains the function.

Config map[string]interface{}

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

DisplayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

FreeformTags map[string]interface{}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

ImageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

InvokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

MemoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

ProvisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

State string

The current state of the function.

TimeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

TimeoutInSeconds int

(Updatable) Timeout for executions of the function. Value in seconds.

TraceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId String

The OCID of the application this function belongs to.

compartmentId String

The OCID of the compartment that contains the function.

config Map<String,Object>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

freeformTags Map<String,Object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

image String

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

imageDigest String

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

invokeEndpoint String

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

memoryInMbs String

(Updatable) Maximum usable memory for the function (MiB).

provisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

state String

The current state of the function.

timeCreated String

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated String

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeoutInSeconds Integer

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId string

The OCID of the application this function belongs to.

compartmentId string

The OCID of the compartment that contains the function.

config {[key: string]: any}

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName string

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

freeformTags {[key: string]: any}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

image string

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

imageDigest string

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

invokeEndpoint string

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

memoryInMbs string

(Updatable) Maximum usable memory for the function (MiB).

provisionedConcurrencyConfig FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

state string

The current state of the function.

timeCreated string

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated string

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeoutInSeconds number

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

application_id str

The OCID of the application this function belongs to.

compartment_id str

The OCID of the compartment that contains the function.

config Mapping[str, Any]

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

display_name str

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

freeform_tags Mapping[str, Any]

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

image str

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

image_digest str

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

invoke_endpoint str

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

memory_in_mbs str

(Updatable) Maximum usable memory for the function (MiB).

provisioned_concurrency_config FunctionProvisionedConcurrencyConfigArgs

(Updatable) Define the strategy for provisioned concurrency for the function.

state str

The current state of the function.

time_created str

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

time_updated str

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeout_in_seconds int

(Updatable) Timeout for executions of the function. Value in seconds.

trace_config FunctionTraceConfigArgs

(Updatable) Define the tracing configuration for a function.

applicationId String

The OCID of the application this function belongs to.

compartmentId String

The OCID of the compartment that contains the function.

config Map<Any>

(Updatable) Function configuration. These values are passed on to the function as environment variables, this overrides application configuration values. Keys must be ASCII strings consisting solely of letters, digits, and the '_' (underscore) character, and must not begin with a digit. Values should be limited to printable unicode characters. Example: {"MY_FUNCTION_CONFIG": "ConfVal"}

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

displayName String

The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information.

freeformTags Map<Any>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

image String

(Updatable) The qualified name of the Docker image to use in the function, including the image tag. The image should be in the Oracle Cloud Infrastructure Registry that is in the same region as the function itself. This field must be updated if image_digest is updated. Example: phx.ocir.io/ten/functions/function:0.0.1

imageDigest String

(Updatable) The image digest for the version of the image that will be pulled when invoking this function. If no value is specified, the digest currently associated with the image in the Oracle Cloud Infrastructure Registry will be used. This field must be updated if image is updated. Example: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7

invokeEndpoint String

The base https invoke URL to set on a client in order to invoke a function. This URL will never change over the lifetime of the function and can be cached.

memoryInMbs String

(Updatable) Maximum usable memory for the function (MiB).

provisionedConcurrencyConfig Property Map

(Updatable) Define the strategy for provisioned concurrency for the function.

state String

The current state of the function.

timeCreated String

The time the function was created, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeUpdated String

The time the function was updated, expressed in RFC 3339 timestamp format. Example: 2018-09-12T22:47:12.613Z

timeoutInSeconds Number

(Updatable) Timeout for executions of the function. Value in seconds.

traceConfig Property Map

(Updatable) Define the tracing configuration for a function.

Supporting Types

FunctionProvisionedConcurrencyConfig

Strategy string

(Updatable) The strategy for provisioned concurrency to be used.

Count int

(Updatable)

Strategy string

(Updatable) The strategy for provisioned concurrency to be used.

Count int

(Updatable)

strategy String

(Updatable) The strategy for provisioned concurrency to be used.

count Integer

(Updatable)

strategy string

(Updatable) The strategy for provisioned concurrency to be used.

count number

(Updatable)

strategy str

(Updatable) The strategy for provisioned concurrency to be used.

count int

(Updatable)

strategy String

(Updatable) The strategy for provisioned concurrency to be used.

count Number

(Updatable)

FunctionTraceConfig

IsEnabled bool

(Updatable) Define if tracing is enabled for the resource.

IsEnabled bool

(Updatable) Define if tracing is enabled for the resource.

isEnabled Boolean

(Updatable) Define if tracing is enabled for the resource.

isEnabled boolean

(Updatable) Define if tracing is enabled for the resource.

is_enabled bool

(Updatable) Define if tracing is enabled for the resource.

isEnabled Boolean

(Updatable) Define if tracing is enabled for the resource.

Import

Functions can be imported using the id, e.g.

 $ pulumi import oci:Functions/function:Function test_function "id"

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.