Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.Database.getOneoffPatches
This data source provides the list of Oneoff Patches in Oracle Cloud Infrastructure Database service.
Lists one-off patches in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testOneoffPatches = oci.Database.getOneoffPatches({
    compartmentId: compartmentId,
    displayName: oneoffPatchDisplayName,
    state: oneoffPatchState,
});
import pulumi
import pulumi_oci as oci
test_oneoff_patches = oci.Database.get_oneoff_patches(compartment_id=compartment_id,
    display_name=oneoff_patch_display_name,
    state=oneoff_patch_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := database.GetOneoffPatches(ctx, &database.GetOneoffPatchesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(oneoffPatchDisplayName),
			State:         pulumi.StringRef(oneoffPatchState),
		}, 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 testOneoffPatches = Oci.Database.GetOneoffPatches.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = oneoffPatchDisplayName,
        State = oneoffPatchState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.inputs.GetOneoffPatchesArgs;
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 testOneoffPatches = DatabaseFunctions.getOneoffPatches(GetOneoffPatchesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(oneoffPatchDisplayName)
            .state(oneoffPatchState)
            .build());
    }
}
variables:
  testOneoffPatches:
    fn::invoke:
      function: oci:Database:getOneoffPatches
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${oneoffPatchDisplayName}
        state: ${oneoffPatchState}
Using getOneoffPatches
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 getOneoffPatches(args: GetOneoffPatchesArgs, opts?: InvokeOptions): Promise<GetOneoffPatchesResult>
function getOneoffPatchesOutput(args: GetOneoffPatchesOutputArgs, opts?: InvokeOptions): Output<GetOneoffPatchesResult>def get_oneoff_patches(compartment_id: Optional[str] = None,
                       display_name: Optional[str] = None,
                       filters: Optional[Sequence[GetOneoffPatchesFilter]] = None,
                       state: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetOneoffPatchesResult
def get_oneoff_patches_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       display_name: Optional[pulumi.Input[str]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOneoffPatchesFilterArgs]]]] = None,
                       state: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetOneoffPatchesResult]func GetOneoffPatches(ctx *Context, args *GetOneoffPatchesArgs, opts ...InvokeOption) (*GetOneoffPatchesResult, error)
func GetOneoffPatchesOutput(ctx *Context, args *GetOneoffPatchesOutputArgs, opts ...InvokeOption) GetOneoffPatchesResultOutput> Note: This function is named GetOneoffPatches in the Go SDK.
public static class GetOneoffPatches 
{
    public static Task<GetOneoffPatchesResult> InvokeAsync(GetOneoffPatchesArgs args, InvokeOptions? opts = null)
    public static Output<GetOneoffPatchesResult> Invoke(GetOneoffPatchesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetOneoffPatchesResult> getOneoffPatches(GetOneoffPatchesArgs args, InvokeOptions options)
public static Output<GetOneoffPatchesResult> getOneoffPatches(GetOneoffPatchesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getOneoffPatches:getOneoffPatches
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Compartment
Id string - (Updatable) The compartment OCID.
 - Display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - Filters
List<Get
Oneoff Patches Filter>  - State string
 - A filter to return only resources that match the given lifecycle state exactly
 
- Compartment
Id string - (Updatable) The compartment OCID.
 - Display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - Filters
[]Get
Oneoff Patches Filter  - State string
 - A filter to return only resources that match the given lifecycle state exactly
 
- compartment
Id String - (Updatable) The compartment OCID.
 - display
Name String - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - filters
List<Get
Oneoff Patches Filter>  - state String
 - A filter to return only resources that match the given lifecycle state exactly
 
- compartment
Id string - (Updatable) The compartment OCID.
 - display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - filters
Get
Oneoff Patches Filter[]  - state string
 - A filter to return only resources that match the given lifecycle state exactly
 
- compartment_
id str - (Updatable) The compartment OCID.
 - display_
name str - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - filters
Sequence[Get
Oneoff Patches Filter]  - state str
 - A filter to return only resources that match the given lifecycle state exactly
 
- compartment
Id String - (Updatable) The compartment OCID.
 - display
Name String - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - filters List<Property Map>
 - state String
 - A filter to return only resources that match the given lifecycle state exactly
 
getOneoffPatches Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Oneoff
Patches List<GetOneoff Patches Oneoff Patch>  - The list of oneoff_patches.
 - Display
Name string - One-off patch name.
 - Filters
List<Get
Oneoff Patches Filter>  - State string
 - The current state of the one-off patch.
 
- Compartment
Id string - The OCID of the compartment.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Oneoff
Patches []GetOneoff Patches Oneoff Patch  - The list of oneoff_patches.
 - Display
Name string - One-off patch name.
 - Filters
[]Get
Oneoff Patches Filter  - State string
 - The current state of the one-off patch.
 
- compartment
Id String - The OCID of the compartment.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - oneoff
Patches List<GetOneoff Patches Oneoff Patch>  - The list of oneoff_patches.
 - display
Name String - One-off patch name.
 - filters
List<Get
Oneoff Patches Filter>  - state String
 - The current state of the one-off patch.
 
- compartment
Id string - The OCID of the compartment.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - oneoff
Patches GetOneoff Patches Oneoff Patch[]  - The list of oneoff_patches.
 - display
Name string - One-off patch name.
 - filters
Get
Oneoff Patches Filter[]  - state string
 - The current state of the one-off patch.
 
- compartment_
id str - The OCID of the compartment.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - oneoff_
patches Sequence[GetOneoff Patches Oneoff Patch]  - The list of oneoff_patches.
 - display_
name str - One-off patch name.
 - filters
Sequence[Get
Oneoff Patches Filter]  - state str
 - The current state of the one-off patch.
 
- compartment
Id String - The OCID of the compartment.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - oneoff
Patches List<Property Map> - The list of oneoff_patches.
 - display
Name String - One-off patch name.
 - filters List<Property Map>
 - state String
 - The current state of the one-off patch.
 
Supporting Types
GetOneoffPatchesFilter   
GetOneoffPatchesOneoffPatch    
- Compartment
Id string - (Updatable) The compartment OCID.
 - Db
Version string - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - Dictionary<string, string>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - Display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - Download
Oneoff intPatch Trigger  - 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"} - Id string
 - The OCID of the one-off patch.
 - Lifecycle
Details string - Detailed message for the lifecycle state.
 - One
Off List<string>Patches  - List of one-off patches for Database Homes.
 - Release
Update string - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - Sha256sum string
 - SHA-256 checksum of the one-off patch.
 - Size
In doubleKbs  - The size of one-off patch in kilobytes.
 - State string
 - A filter to return only resources that match the given lifecycle state exactly
 - Dictionary<string, string>
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - Time
Created string - The date and time one-off patch was created.
 - Time
Of stringExpiration  - The date and time until which the one-off patch will be available for download.
 - Time
Updated string - The date and time one-off patch was updated.
 
- Compartment
Id string - (Updatable) The compartment OCID.
 - Db
Version string - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - map[string]string
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - Display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - Download
Oneoff intPatch Trigger  - 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"} - Id string
 - The OCID of the one-off patch.
 - Lifecycle
Details string - Detailed message for the lifecycle state.
 - One
Off []stringPatches  - List of one-off patches for Database Homes.
 - Release
Update string - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - Sha256sum string
 - SHA-256 checksum of the one-off patch.
 - Size
In float64Kbs  - The size of one-off patch in kilobytes.
 - State string
 - A filter to return only resources that match the given lifecycle state exactly
 - map[string]string
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - Time
Created string - The date and time one-off patch was created.
 - Time
Of stringExpiration  - The date and time until which the one-off patch will be available for download.
 - Time
Updated string - The date and time one-off patch was updated.
 
- compartment
Id String - (Updatable) The compartment OCID.
 - db
Version String - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - Map<String,String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - display
Name String - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - download
Oneoff IntegerPatch Trigger  - 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"} - id String
 - The OCID of the one-off patch.
 - lifecycle
Details String - Detailed message for the lifecycle state.
 - one
Off List<String>Patches  - List of one-off patches for Database Homes.
 - release
Update String - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - sha256sum String
 - SHA-256 checksum of the one-off patch.
 - size
In DoubleKbs  - The size of one-off patch in kilobytes.
 - state String
 - A filter to return only resources that match the given lifecycle state exactly
 - Map<String,String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - time
Created String - The date and time one-off patch was created.
 - time
Of StringExpiration  - The date and time until which the one-off patch will be available for download.
 - time
Updated String - The date and time one-off patch was updated.
 
- compartment
Id string - (Updatable) The compartment OCID.
 - db
Version string - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - {[key: string]: string}
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - display
Name string - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - download
Oneoff numberPatch Trigger  - {[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"} - id string
 - The OCID of the one-off patch.
 - lifecycle
Details string - Detailed message for the lifecycle state.
 - one
Off string[]Patches  - List of one-off patches for Database Homes.
 - release
Update string - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - sha256sum string
 - SHA-256 checksum of the one-off patch.
 - size
In numberKbs  - The size of one-off patch in kilobytes.
 - state string
 - A filter to return only resources that match the given lifecycle state exactly
 - {[key: string]: string}
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - time
Created string - The date and time one-off patch was created.
 - time
Of stringExpiration  - The date and time until which the one-off patch will be available for download.
 - time
Updated string - The date and time one-off patch was updated.
 
- compartment_
id str - (Updatable) The compartment OCID.
 - db_
version str - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - Mapping[str, str]
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - display_
name str - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - download_
oneoff_ intpatch_ trigger  - 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"} - id str
 - The OCID of the one-off patch.
 - lifecycle_
details str - Detailed message for the lifecycle state.
 - one_
off_ Sequence[str]patches  - List of one-off patches for Database Homes.
 - release_
update str - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - sha256sum str
 - SHA-256 checksum of the one-off patch.
 - size_
in_ floatkbs  - The size of one-off patch in kilobytes.
 - state str
 - A filter to return only resources that match the given lifecycle state exactly
 - Mapping[str, str]
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - time_
created str - The date and time one-off patch was created.
 - time_
of_ strexpiration  - The date and time until which the one-off patch will be available for download.
 - time_
updated str - The date and time one-off patch was updated.
 
- compartment
Id String - (Updatable) The compartment OCID.
 - db
Version String - A valid Oracle Database version. To get a list of supported versions, use the ListDbVersions operation.
 - Map<String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - display
Name String - A filter to return only resources that match the entire display name given. The match is not case sensitive.
 - download
Oneoff NumberPatch Trigger  - 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"} - id String
 - The OCID of the one-off patch.
 - lifecycle
Details String - Detailed message for the lifecycle state.
 - one
Off List<String>Patches  - List of one-off patches for Database Homes.
 - release
Update String - The PSU or PBP or Release Updates. To get a list of supported versions, use the ListDbVersions operation.
 - sha256sum String
 - SHA-256 checksum of the one-off patch.
 - size
In NumberKbs  - The size of one-off patch in kilobytes.
 - state String
 - A filter to return only resources that match the given lifecycle state exactly
 - Map<String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
 - time
Created String - The date and time one-off patch was created.
 - time
Of StringExpiration  - The date and time until which the one-off patch will be available for download.
 - time
Updated String - The date and time one-off patch was updated.
 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider. 
