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

ibm.getIsBackupPolicy

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 BackupPolicy. For more information, about backup policy in your IBM Cloud VPC, see Backup policy.

    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.getIsBackupPolicy({
        identifier: ibm_is_backup_policy.example.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_backup_policy(identifier=ibm_is_backup_policy["example"]["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.LookupIsBackupPolicy(ctx, &ibm.LookupIsBackupPolicyArgs{
    			Identifier: pulumi.StringRef(ibm_is_backup_policy.Example.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.GetIsBackupPolicy.Invoke(new()
        {
            Identifier = ibm_is_backup_policy.Example.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.GetIsBackupPolicyArgs;
    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.getIsBackupPolicy(GetIsBackupPolicyArgs.builder()
                .identifier(ibm_is_backup_policy.example().id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsBackupPolicy
          arguments:
            identifier: ${ibm_is_backup_policy.example.id}
    

    Using getIsBackupPolicy

    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 getIsBackupPolicy(args: GetIsBackupPolicyArgs, opts?: InvokeOptions): Promise<GetIsBackupPolicyResult>
    function getIsBackupPolicyOutput(args: GetIsBackupPolicyOutputArgs, opts?: InvokeOptions): Output<GetIsBackupPolicyResult>
    def get_is_backup_policy(id: Optional[str] = None,
                             identifier: Optional[str] = None,
                             name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetIsBackupPolicyResult
    def get_is_backup_policy_output(id: Optional[pulumi.Input[str]] = None,
                             identifier: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetIsBackupPolicyResult]
    func LookupIsBackupPolicy(ctx *Context, args *LookupIsBackupPolicyArgs, opts ...InvokeOption) (*LookupIsBackupPolicyResult, error)
    func LookupIsBackupPolicyOutput(ctx *Context, args *LookupIsBackupPolicyOutputArgs, opts ...InvokeOption) LookupIsBackupPolicyResultOutput

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

    public static class GetIsBackupPolicy 
    {
        public static Task<GetIsBackupPolicyResult> InvokeAsync(GetIsBackupPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBackupPolicyResult> Invoke(GetIsBackupPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsBackupPolicyResult> getIsBackupPolicy(GetIsBackupPolicyArgs args, InvokeOptions options)
    public static Output<GetIsBackupPolicyResult> getIsBackupPolicy(GetIsBackupPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBackupPolicy:getIsBackupPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier for this enterprise or account.
    Identifier string
    The backup policy identifier, identifier and name are mutually exclusive.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    Id string
    (String) The unique identifier for this enterprise or account.
    Identifier string
    The backup policy identifier, identifier and name are mutually exclusive.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    id String
    (String) The unique identifier for this enterprise or account.
    identifier String
    The backup policy identifier, identifier and name are mutually exclusive.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    id string
    (String) The unique identifier for this enterprise or account.
    identifier string
    The backup policy identifier, identifier and name are mutually exclusive.
    name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    id str
    (String) The unique identifier for this enterprise or account.
    identifier str
    The backup policy identifier, identifier and name are mutually exclusive.
    name str
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    id String
    (String) The unique identifier for this enterprise or account.
    identifier String
    The backup policy identifier, identifier and name are mutually exclusive.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.

    getIsBackupPolicy Result

    The following output properties are available:

    CreatedAt string
    (String) The date and time that the backup policy was created.
    Crn string
    (String) The CRN for this enterprise.
    HealthReasons List<GetIsBackupPolicyHealthReason>
    (List) The reasons for the current health_state (if any).
    HealthState string
    (String) The health of this resource.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    IncludedContents List<string>
    LastJobCompletedAt string
    (String) he date and time that the most recent job for this backup policy completed.
    LifecycleState string
    (String) The lifecycle state of the backup policy.
    MatchResourceType string
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    MatchResourceTypes List<string>

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    MatchUserTags List<string>
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    Name string
    (String) The user-defined name for this resource group.
    Plans List<GetIsBackupPolicyPlan>
    (List) The plans for the backup policy.
    ResourceGroups List<GetIsBackupPolicyResourceGroup>
    (List) The resource group object, for this backup policy.
    ResourceType string
    (String) The resource type.
    Scopes List<GetIsBackupPolicyScope>
    (List) If present, the scope for this backup policy.
    Identifier string
    CreatedAt string
    (String) The date and time that the backup policy was created.
    Crn string
    (String) The CRN for this enterprise.
    HealthReasons []GetIsBackupPolicyHealthReason
    (List) The reasons for the current health_state (if any).
    HealthState string
    (String) The health of this resource.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    IncludedContents []string
    LastJobCompletedAt string
    (String) he date and time that the most recent job for this backup policy completed.
    LifecycleState string
    (String) The lifecycle state of the backup policy.
    MatchResourceType string
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    MatchResourceTypes []string

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    MatchUserTags []string
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    Name string
    (String) The user-defined name for this resource group.
    Plans []GetIsBackupPolicyPlanType
    (List) The plans for the backup policy.
    ResourceGroups []GetIsBackupPolicyResourceGroup
    (List) The resource group object, for this backup policy.
    ResourceType string
    (String) The resource type.
    Scopes []GetIsBackupPolicyScope
    (List) If present, the scope for this backup policy.
    Identifier string
    createdAt String
    (String) The date and time that the backup policy was created.
    crn String
    (String) The CRN for this enterprise.
    healthReasons List<GetIsBackupPolicyHealthReason>
    (List) The reasons for the current health_state (if any).
    healthState String
    (String) The health of this resource.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    includedContents List<String>
    lastJobCompletedAt String
    (String) he date and time that the most recent job for this backup policy completed.
    lifecycleState String
    (String) The lifecycle state of the backup policy.
    matchResourceType String
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    matchResourceTypes List<String>

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    matchUserTags List<String>
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    name String
    (String) The user-defined name for this resource group.
    plans List<GetIsBackupPolicyPlan>
    (List) The plans for the backup policy.
    resourceGroups List<GetIsBackupPolicyResourceGroup>
    (List) The resource group object, for this backup policy.
    resourceType String
    (String) The resource type.
    scopes List<GetIsBackupPolicyScope>
    (List) If present, the scope for this backup policy.
    identifier String
    createdAt string
    (String) The date and time that the backup policy was created.
    crn string
    (String) The CRN for this enterprise.
    healthReasons GetIsBackupPolicyHealthReason[]
    (List) The reasons for the current health_state (if any).
    healthState string
    (String) The health of this resource.
    href string
    (String) The URL for this resource group.
    id string
    (String) The unique identifier for this enterprise or account.
    includedContents string[]
    lastJobCompletedAt string
    (String) he date and time that the most recent job for this backup policy completed.
    lifecycleState string
    (String) The lifecycle state of the backup policy.
    matchResourceType string
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    matchResourceTypes string[]

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    matchUserTags string[]
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    name string
    (String) The user-defined name for this resource group.
    plans GetIsBackupPolicyPlan[]
    (List) The plans for the backup policy.
    resourceGroups GetIsBackupPolicyResourceGroup[]
    (List) The resource group object, for this backup policy.
    resourceType string
    (String) The resource type.
    scopes GetIsBackupPolicyScope[]
    (List) If present, the scope for this backup policy.
    identifier string
    created_at str
    (String) The date and time that the backup policy was created.
    crn str
    (String) The CRN for this enterprise.
    health_reasons Sequence[GetIsBackupPolicyHealthReason]
    (List) The reasons for the current health_state (if any).
    health_state str
    (String) The health of this resource.
    href str
    (String) The URL for this resource group.
    id str
    (String) The unique identifier for this enterprise or account.
    included_contents Sequence[str]
    last_job_completed_at str
    (String) he date and time that the most recent job for this backup policy completed.
    lifecycle_state str
    (String) The lifecycle state of the backup policy.
    match_resource_type str
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    match_resource_types Sequence[str]

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    match_user_tags Sequence[str]
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    name str
    (String) The user-defined name for this resource group.
    plans Sequence[GetIsBackupPolicyPlan]
    (List) The plans for the backup policy.
    resource_groups Sequence[GetIsBackupPolicyResourceGroup]
    (List) The resource group object, for this backup policy.
    resource_type str
    (String) The resource type.
    scopes Sequence[GetIsBackupPolicyScope]
    (List) If present, the scope for this backup policy.
    identifier str
    createdAt String
    (String) The date and time that the backup policy was created.
    crn String
    (String) The CRN for this enterprise.
    healthReasons List<Property Map>
    (List) The reasons for the current health_state (if any).
    healthState String
    (String) The health of this resource.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    includedContents List<String>
    lastJobCompletedAt String
    (String) he date and time that the most recent job for this backup policy completed.
    lifecycleState String
    (String) The lifecycle state of the backup policy.
    matchResourceType String
    (Optional, String) The resource type this backup policy will apply to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.
    matchResourceTypes List<String>

    (List) A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag will be subject to the backup policy.

    Note match_resource_types is deprecated. Please use match_resource_type instead.

    matchUserTags List<String>
    (List) The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will be subject to the backup policy.
    name String
    (String) The user-defined name for this resource group.
    plans List<Property Map>
    (List) The plans for the backup policy.
    resourceGroups List<Property Map>
    (List) The resource group object, for this backup policy.
    resourceType String
    (String) The resource type.
    scopes List<Property Map>
    (List) If present, the scope for this backup policy.
    identifier String

    Supporting Types

    GetIsBackupPolicyHealthReason

    Code string
    (String) A snake case string succinctly identifying the reason for this health state.
    Message string
    (String) An explanation of the reason for this health state.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    Code string
    (String) A snake case string succinctly identifying the reason for this health state.
    Message string
    (String) An explanation of the reason for this health state.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    code String
    (String) A snake case string succinctly identifying the reason for this health state.
    message String
    (String) An explanation of the reason for this health state.
    moreInfo String
    (String) Link to documentation about deleted resources.
    code string
    (String) A snake case string succinctly identifying the reason for this health state.
    message string
    (String) An explanation of the reason for this health state.
    moreInfo string
    (String) Link to documentation about deleted resources.
    code str
    (String) A snake case string succinctly identifying the reason for this health state.
    message str
    (String) An explanation of the reason for this health state.
    more_info str
    (String) Link to documentation about deleted resources.
    code String
    (String) A snake case string succinctly identifying the reason for this health state.
    message String
    (String) An explanation of the reason for this health state.
    moreInfo String
    (String) Link to documentation about deleted resources.

    GetIsBackupPolicyPlan

    Deleteds List<GetIsBackupPolicyPlanDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    ResourceType string
    (String) The resource type.
    Deleteds []GetIsBackupPolicyPlanDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    ResourceType string
    (String) The resource type.
    deleteds List<GetIsBackupPolicyPlanDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    resourceType String
    (String) The resource type.
    deleteds GetIsBackupPolicyPlanDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href string
    (String) The URL for this resource group.
    id string
    (String) The unique identifier for this enterprise or account.
    name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    resourceType string
    (String) The resource type.
    deleteds Sequence[GetIsBackupPolicyPlanDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href str
    (String) The URL for this resource group.
    id str
    (String) The unique identifier for this enterprise or account.
    name str
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    resource_type str
    (String) The resource type.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    resourceType String
    (String) The resource type.

    GetIsBackupPolicyPlanDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    GetIsBackupPolicyResourceGroup

    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique identifier for this enterprise or account.
    Name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    href string
    (String) The URL for this resource group.
    id string
    (String) The unique identifier for this enterprise or account.
    name string
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    href str
    (String) The URL for this resource group.
    id str
    (String) The unique identifier for this enterprise or account.
    name str
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique identifier for this enterprise or account.
    name String
    The unique user-defined name for backup policy, identifier and name are mutually exclusive.

    GetIsBackupPolicyScope

    Crn string
    (String) The CRN for this enterprise.
    Id string
    (String) The unique identifier for this enterprise or account.
    ResourceType string
    (String) The resource type.
    Crn string
    (String) The CRN for this enterprise.
    Id string
    (String) The unique identifier for this enterprise or account.
    ResourceType string
    (String) The resource type.
    crn String
    (String) The CRN for this enterprise.
    id String
    (String) The unique identifier for this enterprise or account.
    resourceType String
    (String) The resource type.
    crn string
    (String) The CRN for this enterprise.
    id string
    (String) The unique identifier for this enterprise or account.
    resourceType string
    (String) The resource type.
    crn str
    (String) The CRN for this enterprise.
    id str
    (String) The unique identifier for this enterprise or account.
    resource_type str
    (String) The resource type.
    crn String
    (String) The CRN for this enterprise.
    id String
    (String) The unique identifier for this enterprise or account.
    resourceType String
    (String) The resource type.

    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