1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Functions
  5. getFunction
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

oci.Functions.getFunction

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

    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:

    FunctionId string
    The OCID of this function.
    FunctionId string
    The OCID of this function.
    functionId String
    The OCID of this function.
    functionId string
    The OCID of this function.
    function_id str
    The OCID of this function.
    functionId String
    The OCID of this function.

    getFunction Result

    The following output properties are available:

    ApplicationId string
    The OCID of the application the function belongs to.
    CompartmentId 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"}
    DefinedTags 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"}
    DisplayName string
    The display name of the function. The display name is unique within the application containing the function.
    FreeformTags 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"}
    FunctionId 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
    ImageDigest 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
    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
    Maximum usable memory for the function (MiB).
    ProvisionedConcurrencyConfigs List<GetFunctionProvisionedConcurrencyConfig>
    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.
    SourceDetails List<GetFunctionSourceDetail>
    The source details for the Function. The function can be created from various sources.
    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
    Timeout for executions of the function. Value in seconds.
    TraceConfigs List<GetFunctionTraceConfig>
    Define the tracing configuration for a function.
    ApplicationId string
    The OCID of the application the function belongs to.
    CompartmentId 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"}
    DefinedTags 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"}
    DisplayName string
    The display name of the function. The display name is unique within the application containing the function.
    FreeformTags 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"}
    FunctionId 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
    ImageDigest 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
    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
    Maximum usable memory for the function (MiB).
    ProvisionedConcurrencyConfigs []GetFunctionProvisionedConcurrencyConfig
    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.
    SourceDetails []GetFunctionSourceDetail
    The source details for the Function. The function can be created from various sources.
    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
    Timeout for executions of the function. Value in seconds.
    TraceConfigs []GetFunctionTraceConfig
    Define the tracing configuration for a function.
    applicationId String
    The OCID of the application the function belongs to.
    compartmentId 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"}
    definedTags 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"}
    displayName String
    The display name of the function. The display name is unique within the application containing the function.
    freeformTags 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"}
    functionId 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
    imageDigest 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
    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
    Maximum usable memory for the function (MiB).
    provisionedConcurrencyConfigs List<GetFunctionProvisionedConcurrencyConfig>
    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.
    sourceDetails List<GetFunctionSourceDetail>
    The source details for the Function. The function can be created from various sources.
    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
    Timeout for executions of the function. Value in seconds.
    traceConfigs List<GetFunctionTraceConfig>
    Define the tracing configuration for a function.
    applicationId string
    The OCID of the application the function belongs to.
    compartmentId 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"}
    definedTags {[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"}
    displayName string
    The display name of the function. The display name is unique within the application containing the function.
    freeformTags {[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"}
    functionId 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
    imageDigest 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
    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
    Maximum usable memory for the function (MiB).
    provisionedConcurrencyConfigs GetFunctionProvisionedConcurrencyConfig[]
    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.
    sourceDetails GetFunctionSourceDetail[]
    The source details for the Function. The function can be created from various sources.
    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
    Timeout for executions of the function. Value in seconds.
    traceConfigs GetFunctionTraceConfig[]
    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"}
    defined_tags 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.
    freeform_tags 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_mbs str
    Maximum usable memory for the function (MiB).
    provisioned_concurrency_configs Sequence[functions.GetFunctionProvisionedConcurrencyConfig]
    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.GetFunctionSourceDetail]
    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_seconds int
    Timeout for executions of the function. Value in seconds.
    trace_configs Sequence[functions.GetFunctionTraceConfig]
    Define the tracing configuration for a function.
    applicationId String
    The OCID of the application the function belongs to.
    compartmentId 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"}
    definedTags 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"}
    displayName String
    The display name of the function. The display name is unique within the application containing the function.
    freeformTags 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"}
    functionId 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
    imageDigest 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
    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
    Maximum usable memory for the function (MiB).
    provisionedConcurrencyConfigs List<Property Map>
    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.
    sourceDetails 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.
    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
    Timeout for executions of the function. Value in seconds.
    traceConfigs List<Property Map>
    Define the tracing configuration for a function.

    Supporting Types

    GetFunctionProvisionedConcurrencyConfig

    Count int
    Configuration specifying a constant amount of provisioned concurrency.
    Strategy string
    The strategy for provisioned concurrency to be used.
    Count int
    Configuration specifying a constant amount of provisioned concurrency.
    Strategy string
    The strategy for provisioned concurrency to be used.
    count Integer
    Configuration specifying a constant amount of provisioned concurrency.
    strategy String
    The strategy for provisioned concurrency to be used.
    count number
    Configuration specifying a constant amount of provisioned concurrency.
    strategy string
    The strategy for provisioned concurrency to be used.
    count int
    Configuration specifying a constant amount of provisioned concurrency.
    strategy str
    The strategy for provisioned concurrency to be used.
    count Number
    Configuration specifying a constant amount of provisioned concurrency.
    strategy String
    The strategy for provisioned concurrency to be used.

    GetFunctionSourceDetail

    PbfListingId string
    The OCID of the PbfListing this function is sourced from.
    SourceType string
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
    PbfListingId string
    The OCID of the PbfListing this function is sourced from.
    SourceType string
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
    pbfListingId String
    The OCID of the PbfListing this function is sourced from.
    sourceType String
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
    pbfListingId string
    The OCID of the PbfListing this function is sourced from.
    sourceType string
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
    pbf_listing_id str
    The OCID of the PbfListing this function is sourced from.
    source_type str
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.
    pbfListingId String
    The OCID of the PbfListing this function is sourced from.
    sourceType String
    Type of the Function Source. Possible values: PRE_BUILT_FUNCTIONS.

    GetFunctionTraceConfig

    IsEnabled bool
    Define if tracing is enabled for the resource.
    IsEnabled bool
    Define if tracing is enabled for the resource.
    isEnabled Boolean
    Define if tracing is enabled for the resource.
    isEnabled boolean
    Define if tracing is enabled for the resource.
    is_enabled bool
    Define if tracing is enabled for the resource.
    isEnabled 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.
    oci logo
    Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi