AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.backup.getPlan
Explore with Pulumi AI
Use this data source to get information on an existing backup plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.backup.getPlan({
    planId: "my_example_backup_plan_id",
});
import pulumi
import pulumi_aws as aws
example = aws.backup.get_plan(plan_id="my_example_backup_plan_id")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.LookupPlan(ctx, &backup.LookupPlanArgs{
			PlanId: "my_example_backup_plan_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.Backup.GetPlan.Invoke(new()
    {
        PlanId = "my_example_backup_plan_id",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.BackupFunctions;
import com.pulumi.aws.backup.inputs.GetPlanArgs;
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 = BackupFunctions.getPlan(GetPlanArgs.builder()
            .planId("my_example_backup_plan_id")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:backup:getPlan
      arguments:
        planId: my_example_backup_plan_id
Using getPlan
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 getPlan(args: GetPlanArgs, opts?: InvokeOptions): Promise<GetPlanResult>
function getPlanOutput(args: GetPlanOutputArgs, opts?: InvokeOptions): Output<GetPlanResult>def get_plan(plan_id: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetPlanResult
def get_plan_output(plan_id: Optional[pulumi.Input[str]] = None,
             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetPlanResult]func LookupPlan(ctx *Context, args *LookupPlanArgs, opts ...InvokeOption) (*LookupPlanResult, error)
func LookupPlanOutput(ctx *Context, args *LookupPlanOutputArgs, opts ...InvokeOption) LookupPlanResultOutput> Note: This function is named LookupPlan in the Go SDK.
public static class GetPlan 
{
    public static Task<GetPlanResult> InvokeAsync(GetPlanArgs args, InvokeOptions? opts = null)
    public static Output<GetPlanResult> Invoke(GetPlanInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
public static Output<GetPlanResult> getPlan(GetPlanArgs args, InvokeOptions options)
fn::invoke:
  function: aws:backup/getPlan:getPlan
  arguments:
    # arguments dictionaryThe following arguments are supported:
- PlanId string
- Backup plan ID.
- Dictionary<string, string>
- Metadata that you can assign to help organize the plans you create.
- PlanId string
- Backup plan ID.
- map[string]string
- Metadata that you can assign to help organize the plans you create.
- planId String
- Backup plan ID.
- Map<String,String>
- Metadata that you can assign to help organize the plans you create.
- planId string
- Backup plan ID.
- {[key: string]: string}
- Metadata that you can assign to help organize the plans you create.
- plan_id str
- Backup plan ID.
- Mapping[str, str]
- Metadata that you can assign to help organize the plans you create.
- planId String
- Backup plan ID.
- Map<String>
- Metadata that you can assign to help organize the plans you create.
getPlan Result
The following output properties are available:
- Arn string
- ARN of the backup plan.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Display name of a backup plan.
- PlanId string
- Rules
List<GetPlan Rule> 
- Rules of a backup plan.
- Dictionary<string, string>
- Metadata that you can assign to help organize the plans you create.
- Version string
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
- Arn string
- ARN of the backup plan.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Display name of a backup plan.
- PlanId string
- Rules
[]GetPlan Rule 
- Rules of a backup plan.
- map[string]string
- Metadata that you can assign to help organize the plans you create.
- Version string
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
- arn String
- ARN of the backup plan.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Display name of a backup plan.
- planId String
- rules
List<GetPlan Rule> 
- Rules of a backup plan.
- Map<String,String>
- Metadata that you can assign to help organize the plans you create.
- version String
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
- arn string
- ARN of the backup plan.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Display name of a backup plan.
- planId string
- rules
GetPlan Rule[] 
- Rules of a backup plan.
- {[key: string]: string}
- Metadata that you can assign to help organize the plans you create.
- version string
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
- arn str
- ARN of the backup plan.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Display name of a backup plan.
- plan_id str
- rules
Sequence[GetPlan Rule] 
- Rules of a backup plan.
- Mapping[str, str]
- Metadata that you can assign to help organize the plans you create.
- version str
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
- arn String
- ARN of the backup plan.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Display name of a backup plan.
- planId String
- rules List<Property Map>
- Rules of a backup plan.
- Map<String>
- Metadata that you can assign to help organize the plans you create.
- version String
- Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan.
Supporting Types
GetPlanRule  
- CompletionWindow int
- CopyActions List<GetPlan Rule Copy Action> 
- EnableContinuous boolBackup 
- Lifecycles
List<GetPlan Rule Lifecycle> 
- RuleName string
- Schedule string
- ScheduleExpression stringTimezone 
- StartWindow int
- TargetVault stringName 
- Dictionary<string, string>
- CompletionWindow int
- CopyActions []GetPlan Rule Copy Action 
- EnableContinuous boolBackup 
- Lifecycles
[]GetPlan Rule Lifecycle 
- RuleName string
- Schedule string
- ScheduleExpression stringTimezone 
- StartWindow int
- TargetVault stringName 
- map[string]string
- completionWindow Integer
- copyActions List<GetPlan Rule Copy Action> 
- enableContinuous BooleanBackup 
- lifecycles
List<GetPlan Rule Lifecycle> 
- ruleName String
- schedule String
- scheduleExpression StringTimezone 
- startWindow Integer
- targetVault StringName 
- Map<String,String>
- completionWindow number
- copyActions GetPlan Rule Copy Action[] 
- enableContinuous booleanBackup 
- lifecycles
GetPlan Rule Lifecycle[] 
- ruleName string
- schedule string
- scheduleExpression stringTimezone 
- startWindow number
- targetVault stringName 
- {[key: string]: string}
- completionWindow Number
- copyActions List<Property Map>
- enableContinuous BooleanBackup 
- lifecycles List<Property Map>
- ruleName String
- schedule String
- scheduleExpression StringTimezone 
- startWindow Number
- targetVault StringName 
- Map<String>
GetPlanRuleCopyAction    
GetPlanRuleCopyActionLifecycle     
- coldStorage IntegerAfter 
- deleteAfter Integer
- optIn BooleanTo Archive For Supported Resources 
- coldStorage numberAfter 
- deleteAfter number
- optIn booleanTo Archive For Supported Resources 
- coldStorage NumberAfter 
- deleteAfter Number
- optIn BooleanTo Archive For Supported Resources 
GetPlanRuleLifecycle   
- coldStorage IntegerAfter 
- deleteAfter Integer
- optIn BooleanTo Archive For Supported Resources 
- coldStorage numberAfter 
- deleteAfter number
- optIn booleanTo Archive For Supported Resources 
- coldStorage NumberAfter 
- deleteAfter Number
- optIn BooleanTo Archive For Supported Resources 
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.