1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Mysql
  5. getDbSystemMaintenanceEvents
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi

    This data source provides the list of Db System Maintenance Events in Oracle Cloud Infrastructure MySQL Database service.

    List all the maintenance events.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDbSystemMaintenanceEvents = oci.Mysql.getDbSystemMaintenanceEvents({
        dbSystemId: testMysqlDbSystem.id,
        maintenanceAction: dbSystemMaintenanceEventMaintenanceAction,
        maintenanceStatus: dbSystemMaintenanceEventMaintenanceStatus,
        maintenanceType: dbSystemMaintenanceEventMaintenanceType,
        mysqlVersionAfterMaintenance: dbSystemMaintenanceEventMysqlVersionAfterMaintenance,
        mysqlVersionBeforeMaintenance: dbSystemMaintenanceEventMysqlVersionBeforeMaintenance,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_db_system_maintenance_events = oci.Mysql.get_db_system_maintenance_events(db_system_id=test_mysql_db_system["id"],
        maintenance_action=db_system_maintenance_event_maintenance_action,
        maintenance_status=db_system_maintenance_event_maintenance_status,
        maintenance_type=db_system_maintenance_event_maintenance_type,
        mysql_version_after_maintenance=db_system_maintenance_event_mysql_version_after_maintenance,
        mysql_version_before_maintenance=db_system_maintenance_event_mysql_version_before_maintenance)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/mysql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mysql.GetDbSystemMaintenanceEvents(ctx, &mysql.GetDbSystemMaintenanceEventsArgs{
    			DbSystemId:                    testMysqlDbSystem.Id,
    			MaintenanceAction:             pulumi.StringRef(dbSystemMaintenanceEventMaintenanceAction),
    			MaintenanceStatus:             pulumi.StringRef(dbSystemMaintenanceEventMaintenanceStatus),
    			MaintenanceType:               pulumi.StringRef(dbSystemMaintenanceEventMaintenanceType),
    			MysqlVersionAfterMaintenance:  pulumi.StringRef(dbSystemMaintenanceEventMysqlVersionAfterMaintenance),
    			MysqlVersionBeforeMaintenance: pulumi.StringRef(dbSystemMaintenanceEventMysqlVersionBeforeMaintenance),
    		}, 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 testDbSystemMaintenanceEvents = Oci.Mysql.GetDbSystemMaintenanceEvents.Invoke(new()
        {
            DbSystemId = testMysqlDbSystem.Id,
            MaintenanceAction = dbSystemMaintenanceEventMaintenanceAction,
            MaintenanceStatus = dbSystemMaintenanceEventMaintenanceStatus,
            MaintenanceType = dbSystemMaintenanceEventMaintenanceType,
            MysqlVersionAfterMaintenance = dbSystemMaintenanceEventMysqlVersionAfterMaintenance,
            MysqlVersionBeforeMaintenance = dbSystemMaintenanceEventMysqlVersionBeforeMaintenance,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Mysql.MysqlFunctions;
    import com.pulumi.oci.Mysql.inputs.GetDbSystemMaintenanceEventsArgs;
    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 testDbSystemMaintenanceEvents = MysqlFunctions.getDbSystemMaintenanceEvents(GetDbSystemMaintenanceEventsArgs.builder()
                .dbSystemId(testMysqlDbSystem.id())
                .maintenanceAction(dbSystemMaintenanceEventMaintenanceAction)
                .maintenanceStatus(dbSystemMaintenanceEventMaintenanceStatus)
                .maintenanceType(dbSystemMaintenanceEventMaintenanceType)
                .mysqlVersionAfterMaintenance(dbSystemMaintenanceEventMysqlVersionAfterMaintenance)
                .mysqlVersionBeforeMaintenance(dbSystemMaintenanceEventMysqlVersionBeforeMaintenance)
                .build());
    
        }
    }
    
    variables:
      testDbSystemMaintenanceEvents:
        fn::invoke:
          function: oci:Mysql:getDbSystemMaintenanceEvents
          arguments:
            dbSystemId: ${testMysqlDbSystem.id}
            maintenanceAction: ${dbSystemMaintenanceEventMaintenanceAction}
            maintenanceStatus: ${dbSystemMaintenanceEventMaintenanceStatus}
            maintenanceType: ${dbSystemMaintenanceEventMaintenanceType}
            mysqlVersionAfterMaintenance: ${dbSystemMaintenanceEventMysqlVersionAfterMaintenance}
            mysqlVersionBeforeMaintenance: ${dbSystemMaintenanceEventMysqlVersionBeforeMaintenance}
    

    Using getDbSystemMaintenanceEvents

    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 getDbSystemMaintenanceEvents(args: GetDbSystemMaintenanceEventsArgs, opts?: InvokeOptions): Promise<GetDbSystemMaintenanceEventsResult>
    function getDbSystemMaintenanceEventsOutput(args: GetDbSystemMaintenanceEventsOutputArgs, opts?: InvokeOptions): Output<GetDbSystemMaintenanceEventsResult>
    def get_db_system_maintenance_events(db_system_id: Optional[str] = None,
                                         filters: Optional[Sequence[GetDbSystemMaintenanceEventsFilter]] = None,
                                         maintenance_action: Optional[str] = None,
                                         maintenance_status: Optional[str] = None,
                                         maintenance_type: Optional[str] = None,
                                         mysql_version_after_maintenance: Optional[str] = None,
                                         mysql_version_before_maintenance: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetDbSystemMaintenanceEventsResult
    def get_db_system_maintenance_events_output(db_system_id: Optional[pulumi.Input[str]] = None,
                                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDbSystemMaintenanceEventsFilterArgs]]]] = None,
                                         maintenance_action: Optional[pulumi.Input[str]] = None,
                                         maintenance_status: Optional[pulumi.Input[str]] = None,
                                         maintenance_type: Optional[pulumi.Input[str]] = None,
                                         mysql_version_after_maintenance: Optional[pulumi.Input[str]] = None,
                                         mysql_version_before_maintenance: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetDbSystemMaintenanceEventsResult]
    func GetDbSystemMaintenanceEvents(ctx *Context, args *GetDbSystemMaintenanceEventsArgs, opts ...InvokeOption) (*GetDbSystemMaintenanceEventsResult, error)
    func GetDbSystemMaintenanceEventsOutput(ctx *Context, args *GetDbSystemMaintenanceEventsOutputArgs, opts ...InvokeOption) GetDbSystemMaintenanceEventsResultOutput

    > Note: This function is named GetDbSystemMaintenanceEvents in the Go SDK.

    public static class GetDbSystemMaintenanceEvents 
    {
        public static Task<GetDbSystemMaintenanceEventsResult> InvokeAsync(GetDbSystemMaintenanceEventsArgs args, InvokeOptions? opts = null)
        public static Output<GetDbSystemMaintenanceEventsResult> Invoke(GetDbSystemMaintenanceEventsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbSystemMaintenanceEventsResult> getDbSystemMaintenanceEvents(GetDbSystemMaintenanceEventsArgs args, InvokeOptions options)
    public static Output<GetDbSystemMaintenanceEventsResult> getDbSystemMaintenanceEvents(GetDbSystemMaintenanceEventsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Mysql/getDbSystemMaintenanceEvents:getDbSystemMaintenanceEvents
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DbSystemId string
    The DB System OCID.
    Filters List<GetDbSystemMaintenanceEventsFilter>
    MaintenanceAction string
    The nature of the maintenance event.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    MysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    DbSystemId string
    The DB System OCID.
    Filters []GetDbSystemMaintenanceEventsFilter
    MaintenanceAction string
    The nature of the maintenance event.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    MysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    dbSystemId String
    The DB System OCID.
    filters List<GetDbSystemMaintenanceEventsFilter>
    maintenanceAction String
    The nature of the maintenance event.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance String
    The MySQL version before the maintenance event.
    dbSystemId string
    The DB System OCID.
    filters GetDbSystemMaintenanceEventsFilter[]
    maintenanceAction string
    The nature of the maintenance event.
    maintenanceStatus string
    The last status of the maintenance event.
    maintenanceType string
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    db_system_id str
    The DB System OCID.
    filters Sequence[GetDbSystemMaintenanceEventsFilter]
    maintenance_action str
    The nature of the maintenance event.
    maintenance_status str
    The last status of the maintenance event.
    maintenance_type str
    How the maintenance event was triggered.
    mysql_version_after_maintenance str
    The MySQL version after the maintenance event.
    mysql_version_before_maintenance str
    The MySQL version before the maintenance event.
    dbSystemId String
    The DB System OCID.
    filters List<Property Map>
    maintenanceAction String
    The nature of the maintenance event.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance String
    The MySQL version before the maintenance event.

    getDbSystemMaintenanceEvents Result

    The following output properties are available:

    DbSystemId string
    The OCID of the DB System this maintenance event is associated with.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceEvents List<GetDbSystemMaintenanceEventsMaintenanceEvent>
    The list of maintenance_events.
    Filters List<GetDbSystemMaintenanceEventsFilter>
    MaintenanceAction string
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance.
    MysqlVersionBeforeMaintenance string
    The MySQL version prior to the maintenance.
    DbSystemId string
    The OCID of the DB System this maintenance event is associated with.
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceEvents []GetDbSystemMaintenanceEventsMaintenanceEvent
    The list of maintenance_events.
    Filters []GetDbSystemMaintenanceEventsFilter
    MaintenanceAction string
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance.
    MysqlVersionBeforeMaintenance string
    The MySQL version prior to the maintenance.
    dbSystemId String
    The OCID of the DB System this maintenance event is associated with.
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceEvents List<GetDbSystemMaintenanceEventsMaintenanceEvent>
    The list of maintenance_events.
    filters List<GetDbSystemMaintenanceEventsFilter>
    maintenanceAction String
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance.
    mysqlVersionBeforeMaintenance String
    The MySQL version prior to the maintenance.
    dbSystemId string
    The OCID of the DB System this maintenance event is associated with.
    id string
    The provider-assigned unique ID for this managed resource.
    maintenanceEvents GetDbSystemMaintenanceEventsMaintenanceEvent[]
    The list of maintenance_events.
    filters GetDbSystemMaintenanceEventsFilter[]
    maintenanceAction string
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    maintenanceStatus string
    The last status of the maintenance event.
    maintenanceType string
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance string
    The MySQL version after the maintenance.
    mysqlVersionBeforeMaintenance string
    The MySQL version prior to the maintenance.
    db_system_id str
    The OCID of the DB System this maintenance event is associated with.
    id str
    The provider-assigned unique ID for this managed resource.
    maintenance_events Sequence[GetDbSystemMaintenanceEventsMaintenanceEvent]
    The list of maintenance_events.
    filters Sequence[GetDbSystemMaintenanceEventsFilter]
    maintenance_action str
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    maintenance_status str
    The last status of the maintenance event.
    maintenance_type str
    How the maintenance event was triggered.
    mysql_version_after_maintenance str
    The MySQL version after the maintenance.
    mysql_version_before_maintenance str
    The MySQL version prior to the maintenance.
    dbSystemId String
    The OCID of the DB System this maintenance event is associated with.
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceEvents List<Property Map>
    The list of maintenance_events.
    filters List<Property Map>
    maintenanceAction String
    The nature of the maintenance event. * DATABASE: maintenance event causing a MySQL version upgrade. This may also include OS updates. OS_UPDATE: maintenance event causing an OS update. ONLINE_UPDATE: maintenance event causing downtime-free OS security patches. HARDWARE: hardware maintenance event affecting the DB System's VMs and BMs.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance.
    mysqlVersionBeforeMaintenance String
    The MySQL version prior to the maintenance.

    Supporting Types

    GetDbSystemMaintenanceEventsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetDbSystemMaintenanceEventsMaintenanceEvent

    CompartmentId string
    The OCID of the compartment the maintenance event belongs to.
    DbSystemId string
    The DB System OCID.
    MaintenanceAction string
    The nature of the maintenance event.
    MaintenanceNotes string
    MaintenanceScope string
    The MySQL instances operated during a maintenance event.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    MysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    TimeCreated string
    The date and time the record was created, as described by RFC 3339.
    TimeEnded string
    The date and time the maintenance event ended, as described by RFC 3339.
    TimeMysqlSwitchOverEnded string
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    TimeMysqlSwitchOverStarted string
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    TimeStarted string
    The date and time the maintenance event started, as described by RFC 3339.
    CompartmentId string
    The OCID of the compartment the maintenance event belongs to.
    DbSystemId string
    The DB System OCID.
    MaintenanceAction string
    The nature of the maintenance event.
    MaintenanceNotes string
    MaintenanceScope string
    The MySQL instances operated during a maintenance event.
    MaintenanceStatus string
    The last status of the maintenance event.
    MaintenanceType string
    How the maintenance event was triggered.
    MysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    MysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    TimeCreated string
    The date and time the record was created, as described by RFC 3339.
    TimeEnded string
    The date and time the maintenance event ended, as described by RFC 3339.
    TimeMysqlSwitchOverEnded string
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    TimeMysqlSwitchOverStarted string
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    TimeStarted string
    The date and time the maintenance event started, as described by RFC 3339.
    compartmentId String
    The OCID of the compartment the maintenance event belongs to.
    dbSystemId String
    The DB System OCID.
    maintenanceAction String
    The nature of the maintenance event.
    maintenanceNotes String
    maintenanceScope String
    The MySQL instances operated during a maintenance event.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance String
    The MySQL version before the maintenance event.
    timeCreated String
    The date and time the record was created, as described by RFC 3339.
    timeEnded String
    The date and time the maintenance event ended, as described by RFC 3339.
    timeMysqlSwitchOverEnded String
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    timeMysqlSwitchOverStarted String
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    timeStarted String
    The date and time the maintenance event started, as described by RFC 3339.
    compartmentId string
    The OCID of the compartment the maintenance event belongs to.
    dbSystemId string
    The DB System OCID.
    maintenanceAction string
    The nature of the maintenance event.
    maintenanceNotes string
    maintenanceScope string
    The MySQL instances operated during a maintenance event.
    maintenanceStatus string
    The last status of the maintenance event.
    maintenanceType string
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance string
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance string
    The MySQL version before the maintenance event.
    timeCreated string
    The date and time the record was created, as described by RFC 3339.
    timeEnded string
    The date and time the maintenance event ended, as described by RFC 3339.
    timeMysqlSwitchOverEnded string
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    timeMysqlSwitchOverStarted string
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    timeStarted string
    The date and time the maintenance event started, as described by RFC 3339.
    compartment_id str
    The OCID of the compartment the maintenance event belongs to.
    db_system_id str
    The DB System OCID.
    maintenance_action str
    The nature of the maintenance event.
    maintenance_notes str
    maintenance_scope str
    The MySQL instances operated during a maintenance event.
    maintenance_status str
    The last status of the maintenance event.
    maintenance_type str
    How the maintenance event was triggered.
    mysql_version_after_maintenance str
    The MySQL version after the maintenance event.
    mysql_version_before_maintenance str
    The MySQL version before the maintenance event.
    time_created str
    The date and time the record was created, as described by RFC 3339.
    time_ended str
    The date and time the maintenance event ended, as described by RFC 3339.
    time_mysql_switch_over_ended str
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    time_mysql_switch_over_started str
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    time_started str
    The date and time the maintenance event started, as described by RFC 3339.
    compartmentId String
    The OCID of the compartment the maintenance event belongs to.
    dbSystemId String
    The DB System OCID.
    maintenanceAction String
    The nature of the maintenance event.
    maintenanceNotes String
    maintenanceScope String
    The MySQL instances operated during a maintenance event.
    maintenanceStatus String
    The last status of the maintenance event.
    maintenanceType String
    How the maintenance event was triggered.
    mysqlVersionAfterMaintenance String
    The MySQL version after the maintenance event.
    mysqlVersionBeforeMaintenance String
    The MySQL version before the maintenance event.
    timeCreated String
    The date and time the record was created, as described by RFC 3339.
    timeEnded String
    The date and time the maintenance event ended, as described by RFC 3339.
    timeMysqlSwitchOverEnded String
    The date and time the DB System came back online during the maintenance, as described by RFC 3339.
    timeMysqlSwitchOverStarted String
    The date and time the DB System was initially down during the maintenance, as described by RFC 3339.
    timeStarted String
    The date and time the maintenance event started, as described by RFC 3339.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.2.0
    published on Friday, Mar 6, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.