Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Functions.getFunction
Explore with Pulumi AI
This data source provides details about a specific Function resource in Oracle Cloud Infrastructure Functions service.
Retrieves a function.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testFunction = oci.Functions.getFunction({
functionId: testFunctionOciFunctionsFunction.id,
});
import pulumi
import pulumi_oci as oci
test_function = oci.Functions.get_function(function_id=test_function_oci_functions_function["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Functions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Functions.GetFunction(ctx, &functions.GetFunctionArgs{
FunctionId: testFunctionOciFunctionsFunction.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testFunction = Oci.Functions.GetFunction.Invoke(new()
{
FunctionId = testFunctionOciFunctionsFunction.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Functions.FunctionsFunctions;
import com.pulumi.oci.Functions.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 testFunction = FunctionsFunctions.getFunction(GetFunctionArgs.builder()
.functionId(testFunctionOciFunctionsFunction.id())
.build());
}
}
variables:
testFunction:
fn::invoke:
Function: oci:Functions:getFunction
Arguments:
functionId: ${testFunctionOciFunctionsFunction.id}
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_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFunctionResult
def get_function_output(function_id: 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Functions/getFunction:getFunction
arguments:
# arguments dictionary
The following arguments are supported:
- Function
Id string - The OCID of this function.
- Function
Id string - The OCID of this function.
- function
Id String - The OCID of this function.
- function
Id string - The OCID of this function.
- function_
id str - The OCID of this function.
- function
Id String - The OCID of this function.
getFunction Result
The following output properties are available:
- Application
Id string - The OCID of the application the function belongs to.
- Compartment
Id string - The OCID of the compartment that contains the function.
- Config Dictionary<string, string>
- Function configuration. Overrides application configuration. 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"}
- Dictionary<string, string>
- 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 string - The display name of the function. The display name is unique within the application containing the function.
- Dictionary<string, string>
- 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"}
- Function
Id string - Id string
- The OCID of the function.
- Image string
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- Image
Digest string - 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. Example:
sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
- Invoke
Endpoint 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.
- Memory
In stringMbs - Maximum usable memory for the function (MiB).
- Provisioned
Concurrency List<GetConfigs Function Provisioned Concurrency Config> - Define the strategy for provisioned concurrency for the function.
- Shape string
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - Source
Details List<GetFunction Source Detail> - The source details for the Function. The function can be created from various sources.
- State string
- The current state of the function.
- Time
Created string - The time the function was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- Time
Updated string - The time the function was updated, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- Timeout
In intSeconds - Timeout for executions of the function. Value in seconds.
- Trace
Configs List<GetFunction Trace Config> - Define the tracing configuration for a function.
- Application
Id string - The OCID of the application the function belongs to.
- Compartment
Id string - The OCID of the compartment that contains the function.
- Config map[string]string
- Function configuration. Overrides application configuration. 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"}
- map[string]string
- 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 string - The display name of the function. The display name is unique within the application containing the function.
- map[string]string
- 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"}
- Function
Id string - Id string
- The OCID of the function.
- Image string
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- Image
Digest string - 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. Example:
sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
- Invoke
Endpoint 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.
- Memory
In stringMbs - Maximum usable memory for the function (MiB).
- Provisioned
Concurrency []GetConfigs Function Provisioned Concurrency Config - Define the strategy for provisioned concurrency for the function.
- Shape string
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - Source
Details []GetFunction Source Detail - The source details for the Function. The function can be created from various sources.
- State string
- The current state of the function.
- Time
Created string - The time the function was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- Time
Updated string - The time the function was updated, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- Timeout
In intSeconds - Timeout for executions of the function. Value in seconds.
- Trace
Configs []GetFunction Trace Config - Define the tracing configuration for a function.
- application
Id String - The OCID of the application the function belongs to.
- compartment
Id String - The OCID of the compartment that contains the function.
- config Map<String,String>
- Function configuration. Overrides application configuration. 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"}
- Map<String,String>
- 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 String - The display name of the function. The display name is unique within the application containing the function.
- Map<String,String>
- 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"}
- function
Id String - id String
- The OCID of the function.
- image String
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- image
Digest String - 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. Example:
sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
- invoke
Endpoint 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.
- memory
In StringMbs - Maximum usable memory for the function (MiB).
- provisioned
Concurrency List<GetConfigs Function Provisioned Concurrency Config> - Define the strategy for provisioned concurrency for the function.
- shape String
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - source
Details List<GetFunction Source Detail> - The source details for the Function. The function can be created from various sources.
- state String
- The current state of the function.
- time
Created String - The time the function was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- time
Updated String - The time the function was updated, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- timeout
In IntegerSeconds - Timeout for executions of the function. Value in seconds.
- trace
Configs List<GetFunction Trace Config> - Define the tracing configuration for a function.
- application
Id string - The OCID of the application the function belongs to.
- compartment
Id string - The OCID of the compartment that contains the function.
- config {[key: string]: string}
- Function configuration. Overrides application configuration. 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"}
- {[key: string]: string}
- 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 string - The display name of the function. The display name is unique within the application containing the function.
- {[key: string]: string}
- 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"}
- function
Id string - id string
- The OCID of the function.
- image string
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- image
Digest string - 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. Example:
sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
- invoke
Endpoint 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.
- memory
In stringMbs - Maximum usable memory for the function (MiB).
- provisioned
Concurrency GetConfigs Function Provisioned Concurrency Config[] - Define the strategy for provisioned concurrency for the function.
- shape string
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - source
Details GetFunction Source Detail[] - The source details for the Function. The function can be created from various sources.
- state string
- The current state of the function.
- time
Created string - The time the function was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- time
Updated string - The time the function was updated, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- timeout
In numberSeconds - Timeout for executions of the function. Value in seconds.
- trace
Configs GetFunction Trace Config[] - Define the tracing configuration for a function.
- application_
id str - The OCID of the application the function belongs to.
- compartment_
id str - The OCID of the compartment that contains the function.
- config Mapping[str, str]
- Function configuration. Overrides application configuration. 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"}
- Mapping[str, str]
- 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 is unique within the application containing the function.
- Mapping[str, str]
- 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"}
- function_
id str - id str
- The OCID of the function.
- image str
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- image_
digest str - 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. 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_ strmbs - Maximum usable memory for the function (MiB).
- provisioned_
concurrency_ Sequence[functions.configs Get Function Provisioned Concurrency Config] - Define the strategy for provisioned concurrency for the function.
- shape str
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - source_
details Sequence[functions.Get Function Source Detail] - The source details for the Function. The function can be created from various sources.
- 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_ intseconds - Timeout for executions of the function. Value in seconds.
- trace_
configs Sequence[functions.Get Function Trace Config] - Define the tracing configuration for a function.
- application
Id String - The OCID of the application the function belongs to.
- compartment
Id String - The OCID of the compartment that contains the function.
- config Map<String>
- Function configuration. Overrides application configuration. 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"}
- Map<String>
- 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 String - The display name of the function. The display name is unique within the application containing the function.
- Map<String>
- 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"}
- function
Id String - id String
- The OCID of the function.
- image String
- 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. Example:
phx.ocir.io/ten/functions/function:0.0.1
- image
Digest String - 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. Example:
sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7
- invoke
Endpoint 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.
- memory
In StringMbs - Maximum usable memory for the function (MiB).
- provisioned
Concurrency List<Property Map>Configs - Define the strategy for provisioned concurrency for the function.
- shape String
- The processor shape (
GENERIC_X86
/GENERIC_ARM
) on which to run functions in the application, extracted from the image manifest. - source
Details List<Property Map> - The source details for the Function. The function can be created from various sources.
- state String
- The current state of the function.
- time
Created String - The time the function was created, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- time
Updated String - The time the function was updated, expressed in RFC 3339 timestamp format. Example:
2018-09-12T22:47:12.613Z
- timeout
In NumberSeconds - Timeout for executions of the function. Value in seconds.
- trace
Configs List<Property Map> - Define the tracing configuration for a function.
Supporting Types
GetFunctionProvisionedConcurrencyConfig
GetFunctionSourceDetail
- Pbf
Listing stringId - The OCID of the PbfListing this function is sourced from.
- Source
Type string - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
- Pbf
Listing stringId - The OCID of the PbfListing this function is sourced from.
- Source
Type string - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
- pbf
Listing StringId - The OCID of the PbfListing this function is sourced from.
- source
Type String - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
- pbf
Listing stringId - The OCID of the PbfListing this function is sourced from.
- source
Type string - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
- pbf_
listing_ strid - The OCID of the PbfListing this function is sourced from.
- source_
type str - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
- pbf
Listing StringId - The OCID of the PbfListing this function is sourced from.
- source
Type String - Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
GetFunctionTraceConfig
- Is
Enabled bool - Define if tracing is enabled for the resource.
- Is
Enabled bool - Define if tracing is enabled for the resource.
- is
Enabled Boolean - Define if tracing is enabled for the resource.
- is
Enabled boolean - Define if tracing is enabled for the resource.
- is_
enabled bool - Define if tracing is enabled for the resource.
- is
Enabled Boolean - Define if tracing is enabled for the resource.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.