1. Packages
  2. Linode Provider
  3. API Docs
  4. getMaintenancePolicies
Linode v5.3.0 published on Thursday, Sep 11, 2025 by Pulumi

linode.getMaintenancePolicies

Explore with Pulumi AI

linode logo
Linode v5.3.0 published on Thursday, Sep 11, 2025 by Pulumi

    Provides details about the Maintenance Policies available to apply to Accounts and Instances. For more information, see the Linode APIv4 docs. (Note: v4beta only.)

    Example Usage

    The following example shows how one might use this data source to access information about Maintenance Policies:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const example = linode.getMaintenancePolicies({});
    export const exampleOutput = example;
    
    import pulumi
    import pulumi_linode as linode
    
    example = linode.get_maintenance_policies()
    pulumi.export("exampleOutput", example)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := linode.GetMaintenancePolicies(ctx, &linode.GetMaintenancePoliciesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("exampleOutput", example)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Linode.GetMaintenancePolicies.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["exampleOutput"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetMaintenancePoliciesArgs;
    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 example = LinodeFunctions.getMaintenancePolicies(GetMaintenancePoliciesArgs.builder()
                .build());
    
            ctx.export("exampleOutput", example);
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: linode:getMaintenancePolicies
          arguments: {}
    outputs:
      exampleOutput: ${example}
    

    The following example shows how one might use this data source to access information about Maintenance Policies with a certain slug:

    Using getMaintenancePolicies

    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 getMaintenancePolicies(args: GetMaintenancePoliciesArgs, opts?: InvokeOptions): Promise<GetMaintenancePoliciesResult>
    function getMaintenancePoliciesOutput(args: GetMaintenancePoliciesOutputArgs, opts?: InvokeOptions): Output<GetMaintenancePoliciesResult>
    def get_maintenance_policies(filters: Optional[Sequence[GetMaintenancePoliciesFilter]] = None,
                                 maintenance_policies: Optional[Sequence[GetMaintenancePoliciesMaintenancePolicy]] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetMaintenancePoliciesResult
    def get_maintenance_policies_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMaintenancePoliciesFilterArgs]]]] = None,
                                 maintenance_policies: Optional[pulumi.Input[Sequence[pulumi.Input[GetMaintenancePoliciesMaintenancePolicyArgs]]]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetMaintenancePoliciesResult]
    func GetMaintenancePolicies(ctx *Context, args *GetMaintenancePoliciesArgs, opts ...InvokeOption) (*GetMaintenancePoliciesResult, error)
    func GetMaintenancePoliciesOutput(ctx *Context, args *GetMaintenancePoliciesOutputArgs, opts ...InvokeOption) GetMaintenancePoliciesResultOutput

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

    public static class GetMaintenancePolicies 
    {
        public static Task<GetMaintenancePoliciesResult> InvokeAsync(GetMaintenancePoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetMaintenancePoliciesResult> Invoke(GetMaintenancePoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMaintenancePoliciesResult> getMaintenancePolicies(GetMaintenancePoliciesArgs args, InvokeOptions options)
    public static Output<GetMaintenancePoliciesResult> getMaintenancePolicies(GetMaintenancePoliciesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: linode:index/getMaintenancePolicies:getMaintenancePolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getMaintenancePolicies Result

    The following output properties are available:

    Supporting Types

    GetMaintenancePoliciesFilter

    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values List<string>
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values []string
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)
    name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values string[]
    A list of values for the filter to allow. These values should all be in string form.
    matchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name str
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values Sequence[str]
    A list of values for the filter to allow. These values should all be in string form.
    match_by str
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)

    GetMaintenancePoliciesMaintenancePolicy

    Description string
    Description of this policy
    IsDefault bool
    Whether this is the default policy for the account.
    Label string
    The label for this policy.
    NotificationPeriodSec int
    The notification lead time in seconds.
    Slug string
    Unique identifier for this policy
    Type string
    The type of action taken during maintenance.
    Description string
    Description of this policy
    IsDefault bool
    Whether this is the default policy for the account.
    Label string
    The label for this policy.
    NotificationPeriodSec int
    The notification lead time in seconds.
    Slug string
    Unique identifier for this policy
    Type string
    The type of action taken during maintenance.
    description String
    Description of this policy
    isDefault Boolean
    Whether this is the default policy for the account.
    label String
    The label for this policy.
    notificationPeriodSec Integer
    The notification lead time in seconds.
    slug String
    Unique identifier for this policy
    type String
    The type of action taken during maintenance.
    description string
    Description of this policy
    isDefault boolean
    Whether this is the default policy for the account.
    label string
    The label for this policy.
    notificationPeriodSec number
    The notification lead time in seconds.
    slug string
    Unique identifier for this policy
    type string
    The type of action taken during maintenance.
    description str
    Description of this policy
    is_default bool
    Whether this is the default policy for the account.
    label str
    The label for this policy.
    notification_period_sec int
    The notification lead time in seconds.
    slug str
    Unique identifier for this policy
    type str
    The type of action taken during maintenance.
    description String
    Description of this policy
    isDefault Boolean
    Whether this is the default policy for the account.
    label String
    The label for this policy.
    notificationPeriodSec Number
    The notification lead time in seconds.
    slug String
    Unique identifier for this policy
    type String
    The type of action taken during maintenance.

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Linode v5.3.0 published on Thursday, Sep 11, 2025 by Pulumi