1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FleetAppsManagement
  5. getMaintenanceWindows
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.FleetAppsManagement.getMaintenanceWindows

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Maintenance Windows in Oracle Cloud Infrastructure Fleet Apps Management service.

    Returns a list of MaintenanceWindows in the specified Tenancy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testMaintenanceWindows = oci.FleetAppsManagement.getMaintenanceWindows({
        compartmentId: compartmentId,
        displayName: maintenanceWindowDisplayName,
        id: maintenanceWindowId,
        state: maintenanceWindowState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_maintenance_windows = oci.FleetAppsManagement.get_maintenance_windows(compartment_id=compartment_id,
        display_name=maintenance_window_display_name,
        id=maintenance_window_id,
        state=maintenance_window_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/FleetAppsManagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := FleetAppsManagement.GetMaintenanceWindows(ctx, &fleetappsmanagement.GetMaintenanceWindowsArgs{
    			CompartmentId: pulumi.StringRef(compartmentId),
    			DisplayName:   pulumi.StringRef(maintenanceWindowDisplayName),
    			Id:            pulumi.StringRef(maintenanceWindowId),
    			State:         pulumi.StringRef(maintenanceWindowState),
    		}, 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.FleetAppsManagement.GetMaintenanceWindows.Invoke(new()
        {
            CompartmentId = compartmentId,
            DisplayName = maintenanceWindowDisplayName,
            Id = maintenanceWindowId,
            State = maintenanceWindowState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.FleetAppsManagement.FleetAppsManagementFunctions;
    import com.pulumi.oci.FleetAppsManagement.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 = FleetAppsManagementFunctions.getMaintenanceWindows(GetMaintenanceWindowsArgs.builder()
                .compartmentId(compartmentId)
                .displayName(maintenanceWindowDisplayName)
                .id(maintenanceWindowId)
                .state(maintenanceWindowState)
                .build());
    
        }
    }
    
    variables:
      testMaintenanceWindows:
        fn::invoke:
          Function: oci:FleetAppsManagement:getMaintenanceWindows
          Arguments:
            compartmentId: ${compartmentId}
            displayName: ${maintenanceWindowDisplayName}
            id: ${maintenanceWindowId}
            state: ${maintenanceWindowState}
    

    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,
                                display_name: Optional[str] = None,
                                filters: Optional[Sequence[_fleetappsmanagement.GetMaintenanceWindowsFilter]] = None,
                                id: Optional[str] = None,
                                state: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetMaintenanceWindowsResult
    def get_maintenance_windows_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                display_name: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_fleetappsmanagement.GetMaintenanceWindowsFilterArgs]]]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                state: 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:FleetAppsManagement/getMaintenanceWindows:getMaintenanceWindows
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters List<GetMaintenanceWindowsFilter>
    Id string
    unique MaintenanceWindow identifier
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Filters []GetMaintenanceWindowsFilter
    Id string
    unique MaintenanceWindow identifier
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<GetMaintenanceWindowsFilter>
    id String
    unique MaintenanceWindow identifier
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    compartmentId string
    The ID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the entire display name given.
    filters GetMaintenanceWindowsFilter[]
    id string
    unique MaintenanceWindow identifier
    state string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    compartment_id str
    The ID of the compartment in which to list resources.
    display_name str
    A filter to return only resources that match the entire display name given.
    filters Sequence[fleetappsmanagement.GetMaintenanceWindowsFilter]
    id str
    unique MaintenanceWindow identifier
    state str
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    filters List<Property Map>
    id String
    unique MaintenanceWindow identifier
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.

    getMaintenanceWindows Result

    The following output properties are available:

    MaintenanceWindowCollections List<GetMaintenanceWindowsMaintenanceWindowCollection>
    The list of maintenance_window_collection.
    CompartmentId string
    Tenancy OCID
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    Filters List<GetMaintenanceWindowsFilter>
    Id string
    The OCID of the resource.
    State string
    The current state of the MaintenanceWindow.
    MaintenanceWindowCollections []GetMaintenanceWindowsMaintenanceWindowCollection
    The list of maintenance_window_collection.
    CompartmentId string
    Tenancy OCID
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    Filters []GetMaintenanceWindowsFilter
    Id string
    The OCID of the resource.
    State string
    The current state of the MaintenanceWindow.
    maintenanceWindowCollections List<GetMaintenanceWindowsMaintenanceWindowCollection>
    The list of maintenance_window_collection.
    compartmentId String
    Tenancy OCID
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters List<GetMaintenanceWindowsFilter>
    id String
    The OCID of the resource.
    state String
    The current state of the MaintenanceWindow.
    maintenanceWindowCollections GetMaintenanceWindowsMaintenanceWindowCollection[]
    The list of maintenance_window_collection.
    compartmentId string
    Tenancy OCID
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters GetMaintenanceWindowsFilter[]
    id string
    The OCID of the resource.
    state string
    The current state of the MaintenanceWindow.
    maintenance_window_collections Sequence[fleetappsmanagement.GetMaintenanceWindowsMaintenanceWindowCollection]
    The list of maintenance_window_collection.
    compartment_id str
    Tenancy OCID
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters Sequence[fleetappsmanagement.GetMaintenanceWindowsFilter]
    id str
    The OCID of the resource.
    state str
    The current state of the MaintenanceWindow.
    maintenanceWindowCollections List<Property Map>
    The list of maintenance_window_collection.
    compartmentId String
    Tenancy OCID
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters List<Property Map>
    id String
    The OCID of the resource.
    state String
    The current state of the MaintenanceWindow.

    Supporting Types

    GetMaintenanceWindowsFilter

    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

    GetMaintenanceWindowsMaintenanceWindowCollection

    GetMaintenanceWindowsMaintenanceWindowCollectionItem

    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Duration string
    Duration if schedule type is Custom
    FreeformTags 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
    unique MaintenanceWindow identifier
    IsOutage bool
    Does the maintenenace window cause outage?
    IsRecurring bool
    Is this is a recurring maintenance window
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    MaintenanceWindowType string
    Type of the MaintenanceWindow.
    Recurrences string
    Recurrence rule specification if recurring
    ResourceRegion string
    Associated region
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TaskInitiationCutoff int
    Task initiation cutoff
    TimeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    TimeScheduleStart string
    Start time of schedule
    TimeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    Duration string
    Duration if schedule type is Custom
    FreeformTags 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
    unique MaintenanceWindow identifier
    IsOutage bool
    Does the maintenenace window cause outage?
    IsRecurring bool
    Is this is a recurring maintenance window
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    MaintenanceWindowType string
    Type of the MaintenanceWindow.
    Recurrences string
    Recurrence rule specification if recurring
    ResourceRegion string
    Associated region
    State string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TaskInitiationCutoff int
    Task initiation cutoff
    TimeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    TimeScheduleStart string
    Start time of schedule
    TimeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    displayName String
    A filter to return only resources that match the entire display name given.
    duration String
    Duration if schedule type is Custom
    freeformTags 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
    unique MaintenanceWindow identifier
    isOutage Boolean
    Does the maintenenace window cause outage?
    isRecurring Boolean
    Is this is a recurring maintenance window
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    maintenanceWindowType String
    Type of the MaintenanceWindow.
    recurrences String
    Recurrence rule specification if recurring
    resourceRegion String
    Associated region
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    taskInitiationCutoff Integer
    Task initiation cutoff
    timeCreated String
    The time this resource was created. An RFC3339 formatted datetime string.
    timeScheduleStart String
    Start time of schedule
    timeUpdated String
    The time this resource was last updated. An RFC3339 formatted datetime string.
    compartmentId string
    The ID of the compartment in which to list resources.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    displayName string
    A filter to return only resources that match the entire display name given.
    duration string
    Duration if schedule type is Custom
    freeformTags {[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
    unique MaintenanceWindow identifier
    isOutage boolean
    Does the maintenenace window cause outage?
    isRecurring boolean
    Is this is a recurring maintenance window
    lifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    maintenanceWindowType string
    Type of the MaintenanceWindow.
    recurrences string
    Recurrence rule specification if recurring
    resourceRegion string
    Associated region
    state string
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    taskInitiationCutoff number
    Task initiation cutoff
    timeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    timeScheduleStart string
    Start time of schedule
    timeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    compartment_id str
    The ID of the compartment in which to list resources.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    display_name str
    A filter to return only resources that match the entire display name given.
    duration str
    Duration if schedule type is Custom
    freeform_tags 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
    unique MaintenanceWindow identifier
    is_outage bool
    Does the maintenenace window cause outage?
    is_recurring bool
    Is this is a recurring maintenance window
    lifecycle_details str
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    maintenance_window_type str
    Type of the MaintenanceWindow.
    recurrences str
    Recurrence rule specification if recurring
    resource_region str
    Associated region
    state str
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    task_initiation_cutoff int
    Task initiation cutoff
    time_created str
    The time this resource was created. An RFC3339 formatted datetime string.
    time_schedule_start str
    Start time of schedule
    time_updated str
    The time this resource was last updated. An RFC3339 formatted datetime string.
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    A user-friendly description. To provide some insight about the resource. Avoid entering confidential information.
    displayName String
    A filter to return only resources that match the entire display name given.
    duration String
    Duration if schedule type is Custom
    freeformTags 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
    unique MaintenanceWindow identifier
    isOutage Boolean
    Does the maintenenace window cause outage?
    isRecurring Boolean
    Is this is a recurring maintenance window
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    maintenanceWindowType String
    Type of the MaintenanceWindow.
    recurrences String
    Recurrence rule specification if recurring
    resourceRegion String
    Associated region
    state String
    A filter to return only resources their lifecycleState matches the given lifecycleState.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    taskInitiationCutoff Number
    Task initiation cutoff
    timeCreated String
    The time this resource was created. An RFC3339 formatted datetime string.
    timeScheduleStart String
    Start time of schedule
    timeUpdated String
    The time this resource was last updated. An RFC3339 formatted datetime string.

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi