Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.StackMonitoring.getMaintenanceWindows
Explore with Pulumi AI
This data source provides the list of Maintenance Windows in Oracle Cloud Infrastructure Stack Monitoring service.
Returns a list of maintenance windows.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMaintenanceWindows = oci.StackMonitoring.getMaintenanceWindows({
    compartmentId: compartmentId,
    lifecycleDetails: maintenanceWindowLifecycleDetails,
    name: maintenanceWindowName,
    status: maintenanceWindowStatus,
});
import pulumi
import pulumi_oci as oci
test_maintenance_windows = oci.StackMonitoring.get_maintenance_windows(compartment_id=compartment_id,
    lifecycle_details=maintenance_window_lifecycle_details,
    name=maintenance_window_name,
    status=maintenance_window_status)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/stackmonitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := stackmonitoring.GetMaintenanceWindows(ctx, &stackmonitoring.GetMaintenanceWindowsArgs{
			CompartmentId:    compartmentId,
			LifecycleDetails: pulumi.StringRef(maintenanceWindowLifecycleDetails),
			Name:             pulumi.StringRef(maintenanceWindowName),
			Status:           pulumi.StringRef(maintenanceWindowStatus),
		}, 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 testMaintenanceWindows = Oci.StackMonitoring.GetMaintenanceWindows.Invoke(new()
    {
        CompartmentId = compartmentId,
        LifecycleDetails = maintenanceWindowLifecycleDetails,
        Name = maintenanceWindowName,
        Status = maintenanceWindowStatus,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.StackMonitoring.StackMonitoringFunctions;
import com.pulumi.oci.StackMonitoring.inputs.GetMaintenanceWindowsArgs;
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 testMaintenanceWindows = StackMonitoringFunctions.getMaintenanceWindows(GetMaintenanceWindowsArgs.builder()
            .compartmentId(compartmentId)
            .lifecycleDetails(maintenanceWindowLifecycleDetails)
            .name(maintenanceWindowName)
            .status(maintenanceWindowStatus)
            .build());
    }
}
variables:
  testMaintenanceWindows:
    fn::invoke:
      function: oci:StackMonitoring:getMaintenanceWindows
      arguments:
        compartmentId: ${compartmentId}
        lifecycleDetails: ${maintenanceWindowLifecycleDetails}
        name: ${maintenanceWindowName}
        status: ${maintenanceWindowStatus}
Using getMaintenanceWindows
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 getMaintenanceWindows(args: GetMaintenanceWindowsArgs, opts?: InvokeOptions): Promise<GetMaintenanceWindowsResult>
function getMaintenanceWindowsOutput(args: GetMaintenanceWindowsOutputArgs, opts?: InvokeOptions): Output<GetMaintenanceWindowsResult>def get_maintenance_windows(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[GetMaintenanceWindowsFilter]] = None,
                            lifecycle_details: Optional[str] = None,
                            name: Optional[str] = None,
                            status: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetMaintenanceWindowsResult
def get_maintenance_windows_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMaintenanceWindowsFilterArgs]]]] = None,
                            lifecycle_details: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            status: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetMaintenanceWindowsResult]func GetMaintenanceWindows(ctx *Context, args *GetMaintenanceWindowsArgs, opts ...InvokeOption) (*GetMaintenanceWindowsResult, error)
func GetMaintenanceWindowsOutput(ctx *Context, args *GetMaintenanceWindowsOutputArgs, opts ...InvokeOption) GetMaintenanceWindowsResultOutput> Note: This function is named GetMaintenanceWindows in the Go SDK.
public static class GetMaintenanceWindows 
{
    public static Task<GetMaintenanceWindowsResult> InvokeAsync(GetMaintenanceWindowsArgs args, InvokeOptions? opts = null)
    public static Output<GetMaintenanceWindowsResult> Invoke(GetMaintenanceWindowsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMaintenanceWindowsResult> getMaintenanceWindows(GetMaintenanceWindowsArgs args, InvokeOptions options)
public static Output<GetMaintenanceWindowsResult> getMaintenanceWindows(GetMaintenanceWindowsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:StackMonitoring/getMaintenanceWindows:getMaintenanceWindows
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which data is listed.
- Filters
List<GetMaintenance Windows Filter> 
- LifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- Name string
- A filter to return maintenance windows that match exact resource name.
- Status string
- A filter to return only maintenance windows with matching lifecycleState.
- CompartmentId string
- The ID of the compartment in which data is listed.
- Filters
[]GetMaintenance Windows Filter 
- LifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- Name string
- A filter to return maintenance windows that match exact resource name.
- Status string
- A filter to return only maintenance windows with matching lifecycleState.
- compartmentId String
- The ID of the compartment in which data is listed.
- filters
List<GetMaintenance Windows Filter> 
- lifecycleDetails String
- A filter to return maintenance windows with matching lifecycleDetails.
- name String
- A filter to return maintenance windows that match exact resource name.
- status String
- A filter to return only maintenance windows with matching lifecycleState.
- compartmentId string
- The ID of the compartment in which data is listed.
- filters
GetMaintenance Windows Filter[] 
- lifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- name string
- A filter to return maintenance windows that match exact resource name.
- status string
- A filter to return only maintenance windows with matching lifecycleState.
- compartment_id str
- The ID of the compartment in which data is listed.
- filters
Sequence[GetMaintenance Windows Filter] 
- lifecycle_details str
- A filter to return maintenance windows with matching lifecycleDetails.
- name str
- A filter to return maintenance windows that match exact resource name.
- status str
- A filter to return only maintenance windows with matching lifecycleState.
- compartmentId String
- The ID of the compartment in which data is listed.
- filters List<Property Map>
- lifecycleDetails String
- A filter to return maintenance windows with matching lifecycleDetails.
- name String
- A filter to return maintenance windows that match exact resource name.
- status String
- A filter to return only maintenance windows with matching lifecycleState.
getMaintenanceWindows Result
The following output properties are available:
- CompartmentId string
- Compartment Identifier OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- MaintenanceWindow List<GetCollections Maintenance Windows Maintenance Window Collection> 
- The list of maintenance_window_collection.
- Filters
List<GetMaintenance Windows Filter> 
- LifecycleDetails string
- Lifecycle Details of the Maintenance Window.
- Name string
- Name of the monitored resource
- Status string
- CompartmentId string
- Compartment Identifier OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- MaintenanceWindow []GetCollections Maintenance Windows Maintenance Window Collection 
- The list of maintenance_window_collection.
- Filters
[]GetMaintenance Windows Filter 
- LifecycleDetails string
- Lifecycle Details of the Maintenance Window.
- Name string
- Name of the monitored resource
- Status string
- compartmentId String
- Compartment Identifier OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenanceWindow List<GetCollections Maintenance Windows Maintenance Window Collection> 
- The list of maintenance_window_collection.
- filters
List<GetMaintenance Windows Filter> 
- lifecycleDetails String
- Lifecycle Details of the Maintenance Window.
- name String
- Name of the monitored resource
- status String
- compartmentId string
- Compartment Identifier OCID.
- id string
- The provider-assigned unique ID for this managed resource.
- maintenanceWindow GetCollections Maintenance Windows Maintenance Window Collection[] 
- The list of maintenance_window_collection.
- filters
GetMaintenance Windows Filter[] 
- lifecycleDetails string
- Lifecycle Details of the Maintenance Window.
- name string
- Name of the monitored resource
- status string
- compartment_id str
- Compartment Identifier OCID.
- id str
- The provider-assigned unique ID for this managed resource.
- maintenance_window_ Sequence[Getcollections Maintenance Windows Maintenance Window Collection] 
- The list of maintenance_window_collection.
- filters
Sequence[GetMaintenance Windows Filter] 
- lifecycle_details str
- Lifecycle Details of the Maintenance Window.
- name str
- Name of the monitored resource
- status str
- compartmentId String
- Compartment Identifier OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- maintenanceWindow List<Property Map>Collections 
- The list of maintenance_window_collection.
- filters List<Property Map>
- lifecycleDetails String
- Lifecycle Details of the Maintenance Window.
- name String
- Name of the monitored resource
- status String
Supporting Types
GetMaintenanceWindowsFilter   
GetMaintenanceWindowsMaintenanceWindowCollection     
GetMaintenanceWindowsMaintenanceWindowCollectionItem      
- CompartmentId string
- The ID of the compartment in which data is listed.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of maintenance window.
- LifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- LifecycleState string
- Name string
- A filter to return maintenance windows that match exact resource name.
- NumberOf intResources 
- OperationStatus string
- OperationType string
- Schedules
List<GetMaintenance Windows Maintenance Window Collection Item Schedule> 
- Schedule information of the Maintenance Window
- State string
- Lifecycle state of the monitored resource.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- CompartmentId string
- The ID of the compartment in which data is listed.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of maintenance window.
- LifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- LifecycleState string
- Name string
- A filter to return maintenance windows that match exact resource name.
- NumberOf intResources 
- OperationStatus string
- OperationType string
- Schedules
[]GetMaintenance Windows Maintenance Window Collection Item Schedule 
- Schedule information of the Maintenance Window
- State string
- Lifecycle state of the monitored resource.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- compartmentId String
- The ID of the compartment in which data is listed.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of maintenance window.
- lifecycleDetails String
- A filter to return maintenance windows with matching lifecycleDetails.
- lifecycleState String
- name String
- A filter to return maintenance windows that match exact resource name.
- numberOf IntegerResources 
- operationStatus String
- operationType String
- schedules
List<GetMaintenance Windows Maintenance Window Collection Item Schedule> 
- Schedule information of the Maintenance Window
- state String
- Lifecycle state of the monitored resource.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- compartmentId string
- The ID of the compartment in which data is listed.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- The OCID of maintenance window.
- lifecycleDetails string
- A filter to return maintenance windows with matching lifecycleDetails.
- lifecycleState string
- name string
- A filter to return maintenance windows that match exact resource name.
- numberOf numberResources 
- operationStatus string
- operationType string
- schedules
GetMaintenance Windows Maintenance Window Collection Item Schedule[] 
- Schedule information of the Maintenance Window
- state string
- Lifecycle state of the monitored resource.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- compartment_id str
- The ID of the compartment in which data is listed.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- The OCID of maintenance window.
- lifecycle_details str
- A filter to return maintenance windows with matching lifecycleDetails.
- lifecycle_state str
- name str
- A filter to return maintenance windows that match exact resource name.
- number_of_ intresources 
- operation_status str
- operation_type str
- schedules
Sequence[GetMaintenance Windows Maintenance Window Collection Item Schedule] 
- Schedule information of the Maintenance Window
- state str
- Lifecycle state of the monitored resource.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- compartmentId String
- The ID of the compartment in which data is listed.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of maintenance window.
- lifecycleDetails String
- A filter to return maintenance windows with matching lifecycleDetails.
- lifecycleState String
- name String
- A filter to return maintenance windows that match exact resource name.
- numberOf NumberResources 
- operationStatus String
- operationType String
- schedules List<Property Map>
- Schedule information of the Maintenance Window
- state String
- Lifecycle state of the monitored resource.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
GetMaintenanceWindowsMaintenanceWindowCollectionItemSchedule       
- MaintenanceWindow stringDuration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- MaintenanceWindow stringRecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- ScheduleType string
- Property to identify the type of the Maintenance Window.
- TimeMaintenance stringWindow End 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- TimeMaintenance stringWindow Start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- MaintenanceWindow stringDuration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- MaintenanceWindow stringRecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- ScheduleType string
- Property to identify the type of the Maintenance Window.
- TimeMaintenance stringWindow End 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- TimeMaintenance stringWindow Start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenanceWindow StringDuration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenanceWindow StringRecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- scheduleType String
- Property to identify the type of the Maintenance Window.
- timeMaintenance StringWindow End 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- timeMaintenance StringWindow Start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenanceWindow stringDuration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenanceWindow stringRecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- scheduleType string
- Property to identify the type of the Maintenance Window.
- timeMaintenance stringWindow End 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- timeMaintenance stringWindow Start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenance_window_ strduration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenance_window_ strrecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- schedule_type str
- Property to identify the type of the Maintenance Window.
- time_maintenance_ strwindow_ end 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- time_maintenance_ strwindow_ start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- maintenanceWindow StringDuration 
- Duration time of each recurrence of each Maintenance Window. It must be specified as a string in ISO 8601 extended format.
- maintenanceWindow StringRecurrences 
- A RFC5545 formatted recurrence string which represents the Maintenance Window Recurrence. Please refer this for details:https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 FREQ: Frequency of the Maintenance Window. The supported values are: DAILY and WEEKLY. BYDAY: Comma separated days for Weekly Maintenance Window. BYHOUR: Specifies the start hour of each recurrence after timeMaintenanceWindowStartvalue. BYMINUTE: Specifies the start minute of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 BYSECOND: Specifies the start second of each reccurrence aftertimeMaintenanceWindowStartvalue. The default value is 00 Other Rules are not supported.
- scheduleType String
- Property to identify the type of the Maintenance Window.
- timeMaintenance StringWindow End 
- Start time of Maintenance window. A RFC3339 formatted datetime string
- timeMaintenance StringWindow Start 
- Start time of Maintenance window. A RFC3339 formatted datetime string
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.