1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsBackupPolicyPlan
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsBackupPolicyPlan

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source for BackupPolicyPlan. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getIsBackupPolicyPlan({
        backupPolicyId: ibm_is_backup_policy.example.id,
        identifier: ibm_is_backup_policy_plan.example.backup_policy_plan_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_backup_policy_plan(backup_policy_id=ibm_is_backup_policy["example"]["id"],
        identifier=ibm_is_backup_policy_plan["example"]["backup_policy_plan_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupIsBackupPolicyPlan(ctx, &ibm.LookupIsBackupPolicyPlanArgs{
    			BackupPolicyId: ibm_is_backup_policy.Example.Id,
    			Identifier:     pulumi.StringRef(ibm_is_backup_policy_plan.Example.Backup_policy_plan_id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ibm.GetIsBackupPolicyPlan.Invoke(new()
        {
            BackupPolicyId = ibm_is_backup_policy.Example.Id,
            Identifier = ibm_is_backup_policy_plan.Example.Backup_policy_plan_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsBackupPolicyPlanArgs;
    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 = IbmFunctions.getIsBackupPolicyPlan(GetIsBackupPolicyPlanArgs.builder()
                .backupPolicyId(ibm_is_backup_policy.example().id())
                .identifier(ibm_is_backup_policy_plan.example().backup_policy_plan_id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsBackupPolicyPlan
          arguments:
            backupPolicyId: ${ibm_is_backup_policy.example.id}
            identifier: ${ibm_is_backup_policy_plan.example.backup_policy_plan_id}
    

    ->Note: Backup Policy Jobs are getting enhanced, will be available soon.

    Using getIsBackupPolicyPlan

    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 getIsBackupPolicyPlan(args: GetIsBackupPolicyPlanArgs, opts?: InvokeOptions): Promise<GetIsBackupPolicyPlanResult>
    function getIsBackupPolicyPlanOutput(args: GetIsBackupPolicyPlanOutputArgs, opts?: InvokeOptions): Output<GetIsBackupPolicyPlanResult>
    def get_is_backup_policy_plan(backup_policy_id: Optional[str] = None,
                                  id: Optional[str] = None,
                                  identifier: Optional[str] = None,
                                  name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetIsBackupPolicyPlanResult
    def get_is_backup_policy_plan_output(backup_policy_id: Optional[pulumi.Input[str]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  identifier: Optional[pulumi.Input[str]] = None,
                                  name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetIsBackupPolicyPlanResult]
    func LookupIsBackupPolicyPlan(ctx *Context, args *LookupIsBackupPolicyPlanArgs, opts ...InvokeOption) (*LookupIsBackupPolicyPlanResult, error)
    func LookupIsBackupPolicyPlanOutput(ctx *Context, args *LookupIsBackupPolicyPlanOutputArgs, opts ...InvokeOption) LookupIsBackupPolicyPlanResultOutput

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

    public static class GetIsBackupPolicyPlan 
    {
        public static Task<GetIsBackupPolicyPlanResult> InvokeAsync(GetIsBackupPolicyPlanArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBackupPolicyPlanResult> Invoke(GetIsBackupPolicyPlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsBackupPolicyPlanResult> getIsBackupPolicyPlan(GetIsBackupPolicyPlanArgs args, InvokeOptions options)
    public static Output<GetIsBackupPolicyPlanResult> getIsBackupPolicyPlan(GetIsBackupPolicyPlanArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBackupPolicyPlan:getIsBackupPolicyPlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackupPolicyId string
    The backup policy identifier.
    Id string
    The unique identifier of the BackupPolicyPlan.
    Identifier string
    The backup policy plan identifier, identifier and name are mutually exclusive.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    BackupPolicyId string
    The backup policy identifier.
    Id string
    The unique identifier of the BackupPolicyPlan.
    Identifier string
    The backup policy plan identifier, identifier and name are mutually exclusive.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    backupPolicyId String
    The backup policy identifier.
    id String
    The unique identifier of the BackupPolicyPlan.
    identifier String
    The backup policy plan identifier, identifier and name are mutually exclusive.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    backupPolicyId string
    The backup policy identifier.
    id string
    The unique identifier of the BackupPolicyPlan.
    identifier string
    The backup policy plan identifier, identifier and name are mutually exclusive.
    name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    backup_policy_id str
    The backup policy identifier.
    id str
    The unique identifier of the BackupPolicyPlan.
    identifier str
    The backup policy plan identifier, identifier and name are mutually exclusive.
    name str
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    backupPolicyId String
    The backup policy identifier.
    id String
    The unique identifier of the BackupPolicyPlan.
    identifier String
    The backup policy plan identifier, identifier and name are mutually exclusive.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.

    getIsBackupPolicyPlan Result

    The following output properties are available:

    Active bool
    (Boolean) Indicates whether the plan is active.
    AttachUserTags List<string>
    (List) User tags to attach to each resource created by this plan.
    BackupPolicyId string
    ClonePolicies List<GetIsBackupPolicyPlanClonePolicy>
    (List)
    CopyUserTags bool
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    CreatedAt string
    (String) The date and time that the backup policy plan was created.
    CronSpec string
    (String) The cron specification for the backup schedule.
    DeletionTriggers List<GetIsBackupPolicyPlanDeletionTrigger>
    (List) deletion_trigger block has the following structure:
    Href string
    (String) The URL for this backup policy plan.
    Id string
    The unique identifier of the BackupPolicyPlan.
    LifecycleState string
    (String) The lifecycle state of this backup policy plan.
    Name string
    RemoteRegionPolicies List<GetIsBackupPolicyPlanRemoteRegionPolicy>
    (Optional, List) Backup policy plan cross region rule.
    ResourceType string
    (String) The type of resource referenced.
    Identifier string
    Active bool
    (Boolean) Indicates whether the plan is active.
    AttachUserTags []string
    (List) User tags to attach to each resource created by this plan.
    BackupPolicyId string
    ClonePolicies []GetIsBackupPolicyPlanClonePolicy
    (List)
    CopyUserTags bool
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    CreatedAt string
    (String) The date and time that the backup policy plan was created.
    CronSpec string
    (String) The cron specification for the backup schedule.
    DeletionTriggers []GetIsBackupPolicyPlanDeletionTrigger
    (List) deletion_trigger block has the following structure:
    Href string
    (String) The URL for this backup policy plan.
    Id string
    The unique identifier of the BackupPolicyPlan.
    LifecycleState string
    (String) The lifecycle state of this backup policy plan.
    Name string
    RemoteRegionPolicies []GetIsBackupPolicyPlanRemoteRegionPolicy
    (Optional, List) Backup policy plan cross region rule.
    ResourceType string
    (String) The type of resource referenced.
    Identifier string
    active Boolean
    (Boolean) Indicates whether the plan is active.
    attachUserTags List<String>
    (List) User tags to attach to each resource created by this plan.
    backupPolicyId String
    clonePolicies List<GetIsBackupPolicyPlanClonePolicy>
    (List)
    copyUserTags Boolean
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    createdAt String
    (String) The date and time that the backup policy plan was created.
    cronSpec String
    (String) The cron specification for the backup schedule.
    deletionTriggers List<GetIsBackupPolicyPlanDeletionTrigger>
    (List) deletion_trigger block has the following structure:
    href String
    (String) The URL for this backup policy plan.
    id String
    The unique identifier of the BackupPolicyPlan.
    lifecycleState String
    (String) The lifecycle state of this backup policy plan.
    name String
    remoteRegionPolicies List<GetIsBackupPolicyPlanRemoteRegionPolicy>
    (Optional, List) Backup policy plan cross region rule.
    resourceType String
    (String) The type of resource referenced.
    identifier String
    active boolean
    (Boolean) Indicates whether the plan is active.
    attachUserTags string[]
    (List) User tags to attach to each resource created by this plan.
    backupPolicyId string
    clonePolicies GetIsBackupPolicyPlanClonePolicy[]
    (List)
    copyUserTags boolean
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    createdAt string
    (String) The date and time that the backup policy plan was created.
    cronSpec string
    (String) The cron specification for the backup schedule.
    deletionTriggers GetIsBackupPolicyPlanDeletionTrigger[]
    (List) deletion_trigger block has the following structure:
    href string
    (String) The URL for this backup policy plan.
    id string
    The unique identifier of the BackupPolicyPlan.
    lifecycleState string
    (String) The lifecycle state of this backup policy plan.
    name string
    remoteRegionPolicies GetIsBackupPolicyPlanRemoteRegionPolicy[]
    (Optional, List) Backup policy plan cross region rule.
    resourceType string
    (String) The type of resource referenced.
    identifier string
    active bool
    (Boolean) Indicates whether the plan is active.
    attach_user_tags Sequence[str]
    (List) User tags to attach to each resource created by this plan.
    backup_policy_id str
    clone_policies Sequence[GetIsBackupPolicyPlanClonePolicy]
    (List)
    copy_user_tags bool
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    created_at str
    (String) The date and time that the backup policy plan was created.
    cron_spec str
    (String) The cron specification for the backup schedule.
    deletion_triggers Sequence[GetIsBackupPolicyPlanDeletionTrigger]
    (List) deletion_trigger block has the following structure:
    href str
    (String) The URL for this backup policy plan.
    id str
    The unique identifier of the BackupPolicyPlan.
    lifecycle_state str
    (String) The lifecycle state of this backup policy plan.
    name str
    remote_region_policies Sequence[GetIsBackupPolicyPlanRemoteRegionPolicy]
    (Optional, List) Backup policy plan cross region rule.
    resource_type str
    (String) The type of resource referenced.
    identifier str
    active Boolean
    (Boolean) Indicates whether the plan is active.
    attachUserTags List<String>
    (List) User tags to attach to each resource created by this plan.
    backupPolicyId String
    clonePolicies List<Property Map>
    (List)
    copyUserTags Boolean
    (Boolean) Indicates whether to copy the source's user tags to the created resource.
    createdAt String
    (String) The date and time that the backup policy plan was created.
    cronSpec String
    (String) The cron specification for the backup schedule.
    deletionTriggers List<Property Map>
    (List) deletion_trigger block has the following structure:
    href String
    (String) The URL for this backup policy plan.
    id String
    The unique identifier of the BackupPolicyPlan.
    lifecycleState String
    (String) The lifecycle state of this backup policy plan.
    name String
    remoteRegionPolicies List<Property Map>
    (Optional, List) Backup policy plan cross region rule.
    resourceType String
    (String) The type of resource referenced.
    identifier String

    Supporting Types

    GetIsBackupPolicyPlanClonePolicy

    MaxSnapshots double
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    Zones List<string>
    (List) The zone list this backup policy plan will create snapshot clones in.
    MaxSnapshots float64
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    Zones []string
    (List) The zone list this backup policy plan will create snapshot clones in.
    maxSnapshots Double
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    zones List<String>
    (List) The zone list this backup policy plan will create snapshot clones in.
    maxSnapshots number
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    zones string[]
    (List) The zone list this backup policy plan will create snapshot clones in.
    max_snapshots float
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    zones Sequence[str]
    (List) The zone list this backup policy plan will create snapshot clones in.
    maxSnapshots Number
    (Integer) The maximum number of recent snapshots (per source) that will keep clones.
    zones List<String>
    (List) The zone list this backup policy plan will create snapshot clones in.

    GetIsBackupPolicyPlanDeletionTrigger

    DeleteAfter double
    (Integer) The maximum number of days to keep each backup after creation.
    DeleteOverCount double
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    DeleteAfter float64
    (Integer) The maximum number of days to keep each backup after creation.
    DeleteOverCount float64
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    deleteAfter Double
    (Integer) The maximum number of days to keep each backup after creation.
    deleteOverCount Double
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    deleteAfter number
    (Integer) The maximum number of days to keep each backup after creation.
    deleteOverCount number
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    delete_after float
    (Integer) The maximum number of days to keep each backup after creation.
    delete_over_count float
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    deleteAfter Number
    (Integer) The maximum number of days to keep each backup after creation.
    deleteOverCount Number
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.

    GetIsBackupPolicyPlanRemoteRegionPolicy

    DeleteOverCount double
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    EncryptionKey string
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    Region string
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.
    DeleteOverCount float64
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    EncryptionKey string
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    Region string
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.
    deleteOverCount Double
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    encryptionKey String
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    region String
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.
    deleteOverCount number
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    encryptionKey string
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    region string
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.
    delete_over_count float
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    encryption_key str
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    region str
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.
    deleteOverCount Number
    (Optional, Integer) The maximum number of recent remote copies to keep in this region.
    encryptionKey String
    (Optional, String) The root key to use to rewrap the data encryption key for the snapshot.If unspecified, the source's encryption_key will be used.The specified key may be in a different account, subject to IAM policies. The CRN of the Key Protect Root Key or Hyper Protect Crypto Services Root Key for this resource.
    region String
    (Required, String) Identifies a region by a unique property. The globally unique name for this region.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud