import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Function resource in Oracle Cloud Infrastructure Functions service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/functions/latest/Function * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/functions * * Creates a new function. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testFunction = new oci.functions.Function("test_function", { * applicationId: testApplication.id, * displayName: functionDisplayName, * memoryInMbs: functionMemoryInMbs, * config: functionConfig, * definedTags: { * "Operations.CostCenter": "42", * }, * detachedModeTimeoutInSeconds: Number(functionDetachedModeTimeoutInSeconds), * failureDestination: { * kind: functionFailureDestinationKind, * channelId: testChannel.id, * queueId: testQueue.id, * streamId: testStream.id, * topicId: testNotificationTopic.id, * }, * freeformTags: { * Department: "Finance", * }, * image: functionImage, * imageDigest: functionImageDigest, * provisionedConcurrencyConfig: { * strategy: functionProvisionedConcurrencyConfigStrategy, * count: Number(functionProvisionedConcurrencyConfigCount), * }, * sourceDetails: { * pbfListingId: testPbfListing.id, * sourceType: functionSourceDetailsSourceType, * }, * successDestination: { * kind: functionSuccessDestinationKind, * channelId: testChannel.id, * queueId: testQueue.id, * streamId: testStream.id, * topicId: testNotificationTopic.id, * }, * timeoutInSeconds: Number(functionTimeoutInSeconds), * traceConfig: { * isEnabled: functionTraceConfigIsEnabled === "true", * }, * }); * ``` * * ## Import * * Functions can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Functions/function:Function test_function "id" * ``` */ export declare class Function extends pulumi.CustomResource { /** * Get an existing Function resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: FunctionState, opts?: pulumi.CustomResourceOptions): Function; /** * Returns true if the given object is an instance of Function. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Function; /** * The OCID of the application this function belongs to. */ readonly applicationId: pulumi.Output; /** * The OCID of the compartment that contains the function. */ readonly compartmentId: pulumi.Output; /** * (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"}` * * The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8. */ readonly config: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Timeout for detached function invocations. Value in seconds. */ readonly detachedModeTimeoutInSeconds: pulumi.Output; /** * The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the error of the failed detached function invocation. A notification is an example of a failure destination. Example: `{"kind": "NOTIFICATION", "topicId": "topic_OCID"}` */ readonly failureDestination: pulumi.Output; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: 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 imageDigest is updated. Example: `phx.ocir.io/ten/functions/function:0.0.1` */ readonly image: pulumi.Output; /** * (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` */ readonly imageDigest: pulumi.Output; /** * 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. */ readonly invokeEndpoint: pulumi.Output; /** * (Updatable) Maximum usable memory for the function (MiB). */ readonly memoryInMbs: pulumi.Output; /** * (Updatable) Define the strategy for provisioned concurrency for the function. */ readonly provisionedConcurrencyConfig: pulumi.Output; /** * The processor shape (`GENERIC_X86`/`GENERIC_ARM`) on which to run functions in the application, extracted from the image manifest. */ readonly shape: pulumi.Output; /** * The source details for the Function. The function can be created from various sources. */ readonly sourceDetails: pulumi.Output; /** * The current state of the function. */ readonly state: pulumi.Output; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the successful detached function invocation. A stream is an example of a success destination. Example: `{"kind": "STREAM", "streamId": "stream_OCID"}` */ readonly successDestination: pulumi.Output; /** * The time the function was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-09-12T22:47:12.613Z` */ readonly timeCreated: pulumi.Output; /** * The time the function was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-09-12T22:47:12.613Z` */ readonly timeUpdated: pulumi.Output; /** * (Updatable) Timeout for executions of the function. Value in seconds. */ readonly timeoutInSeconds: pulumi.Output; /** * (Updatable) Define the tracing configuration for a function. */ readonly traceConfig: pulumi.Output; /** * Create a Function resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FunctionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Function resources. */ export interface FunctionState { /** * The OCID of the application this function belongs to. */ applicationId?: pulumi.Input; /** * The OCID of the compartment that contains the function. */ compartmentId?: pulumi.Input; /** * (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"}` * * The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8. */ config?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Timeout for detached function invocations. Value in seconds. */ detachedModeTimeoutInSeconds?: pulumi.Input; /** * The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the error of the failed detached function invocation. A notification is an example of a failure destination. Example: `{"kind": "NOTIFICATION", "topicId": "topic_OCID"}` */ failureDestination?: pulumi.Input; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (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 imageDigest is updated. Example: `phx.ocir.io/ten/functions/function:0.0.1` */ image?: pulumi.Input; /** * (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` */ imageDigest?: pulumi.Input; /** * 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. */ invokeEndpoint?: pulumi.Input; /** * (Updatable) Maximum usable memory for the function (MiB). */ memoryInMbs?: pulumi.Input; /** * (Updatable) Define the strategy for provisioned concurrency for the function. */ provisionedConcurrencyConfig?: pulumi.Input; /** * The processor shape (`GENERIC_X86`/`GENERIC_ARM`) on which to run functions in the application, extracted from the image manifest. */ shape?: pulumi.Input; /** * The source details for the Function. The function can be created from various sources. */ sourceDetails?: pulumi.Input; /** * The current state of the function. */ state?: pulumi.Input; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the successful detached function invocation. A stream is an example of a success destination. Example: `{"kind": "STREAM", "streamId": "stream_OCID"}` */ successDestination?: pulumi.Input; /** * The time the function was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-09-12T22:47:12.613Z` */ timeCreated?: pulumi.Input; /** * The time the function was updated, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-09-12T22:47:12.613Z` */ timeUpdated?: pulumi.Input; /** * (Updatable) Timeout for executions of the function. Value in seconds. */ timeoutInSeconds?: pulumi.Input; /** * (Updatable) Define the tracing configuration for a function. */ traceConfig?: pulumi.Input; } /** * The set of arguments for constructing a Function resource. */ export interface FunctionArgs { /** * The OCID of the application this function belongs to. */ applicationId: pulumi.Input; /** * (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"}` * * The maximum size for all configuration keys and values is limited to 4KB. This is measured as the sum of octets necessary to represent each key and value in UTF-8. */ config?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Timeout for detached function invocations. Value in seconds. */ detachedModeTimeoutInSeconds?: pulumi.Input; /** * The display name of the function. The display name must be unique within the application containing the function. Avoid entering confidential information. */ displayName: pulumi.Input; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the error of the failed detached function invocation. A notification is an example of a failure destination. Example: `{"kind": "NOTIFICATION", "topicId": "topic_OCID"}` */ failureDestination?: pulumi.Input; /** * (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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (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 imageDigest is updated. Example: `phx.ocir.io/ten/functions/function:0.0.1` */ image?: pulumi.Input; /** * (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` */ imageDigest?: pulumi.Input; /** * (Updatable) Maximum usable memory for the function (MiB). */ memoryInMbs: pulumi.Input; /** * (Updatable) Define the strategy for provisioned concurrency for the function. */ provisionedConcurrencyConfig?: pulumi.Input; /** * The source details for the Function. The function can be created from various sources. */ sourceDetails?: pulumi.Input; /** * (Updatable) An object that represents the destination to which Oracle Functions will send an invocation record with the details of the successful detached function invocation. A stream is an example of a success destination. Example: `{"kind": "STREAM", "streamId": "stream_OCID"}` */ successDestination?: pulumi.Input; /** * (Updatable) Timeout for executions of the function. Value in seconds. */ timeoutInSeconds?: pulumi.Input; /** * (Updatable) Define the tracing configuration for a function. */ traceConfig?: pulumi.Input; } //# sourceMappingURL=function.d.ts.map