1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCosBackupPolicy
ibm 1.80.0-beta0 published on Tuesday, Jun 24, 2025 by ibm-cloud

ibm.getCosBackupPolicy

Explore with Pulumi AI

ibm logo
ibm 1.80.0-beta0 published on Tuesday, Jun 24, 2025 by ibm-cloud

    Retrieves information for a backup policy on a given source bucket.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    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.GetCosBackupPolicyArgs;
    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 policy = IbmFunctions.getCosBackupPolicy(GetCosBackupPolicyArgs.builder()
                .bucketName("name of the source bucket")
                .policysId("id of the policy")
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          function: ibm:getCosBackupPolicy
          arguments:
            bucketName: name of the source bucket
            policysId: id of the policy
    

    Using getCosBackupPolicy

    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 getCosBackupPolicy(args: GetCosBackupPolicyArgs, opts?: InvokeOptions): Promise<GetCosBackupPolicyResult>
    function getCosBackupPolicyOutput(args: GetCosBackupPolicyOutputArgs, opts?: InvokeOptions): Output<GetCosBackupPolicyResult>
    def get_cos_backup_policy(bucket_name: Optional[str] = None,
                              id: Optional[str] = None,
                              policy_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCosBackupPolicyResult
    def get_cos_backup_policy_output(bucket_name: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              policy_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCosBackupPolicyResult]
    func LookupCosBackupPolicy(ctx *Context, args *LookupCosBackupPolicyArgs, opts ...InvokeOption) (*LookupCosBackupPolicyResult, error)
    func LookupCosBackupPolicyOutput(ctx *Context, args *LookupCosBackupPolicyOutputArgs, opts ...InvokeOption) LookupCosBackupPolicyResultOutput

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

    public static class GetCosBackupPolicy 
    {
        public static Task<GetCosBackupPolicyResult> InvokeAsync(GetCosBackupPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetCosBackupPolicyResult> Invoke(GetCosBackupPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCosBackupPolicyResult> getCosBackupPolicy(GetCosBackupPolicyArgs args, InvokeOptions options)
    public static Output<GetCosBackupPolicyResult> getCosBackupPolicy(GetCosBackupPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCosBackupPolicy:getCosBackupPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BucketName string
    Name of the bucket name.
    PolicyId string
    Id of the policy to be retrieved
    Id string
    BucketName string
    Name of the bucket name.
    PolicyId string
    Id of the policy to be retrieved
    Id string
    bucketName String
    Name of the bucket name.
    policyId String
    Id of the policy to be retrieved
    id String
    bucketName string
    Name of the bucket name.
    policyId string
    Id of the policy to be retrieved
    id string
    bucket_name str
    Name of the bucket name.
    policy_id str
    Id of the policy to be retrieved
    id str
    bucketName String
    Name of the bucket name.
    policyId String
    Id of the policy to be retrieved
    id String

    getCosBackupPolicy Result

    The following output properties are available:

    BackupType string
    (String) CRN of the backuo vault.
    BucketName string
    Id string
    InitialDeleteAfterDays double
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    PolicyId string
    PolicyName string
    (String) Name of the policy.
    TargetBackupVaultCrn string
    (String) Type of backup supported.
    BackupType string
    (String) CRN of the backuo vault.
    BucketName string
    Id string
    InitialDeleteAfterDays float64
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    PolicyId string
    PolicyName string
    (String) Name of the policy.
    TargetBackupVaultCrn string
    (String) Type of backup supported.
    backupType String
    (String) CRN of the backuo vault.
    bucketName String
    id String
    initialDeleteAfterDays Double
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    policyId String
    policyName String
    (String) Name of the policy.
    targetBackupVaultCrn String
    (String) Type of backup supported.
    backupType string
    (String) CRN of the backuo vault.
    bucketName string
    id string
    initialDeleteAfterDays number
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    policyId string
    policyName string
    (String) Name of the policy.
    targetBackupVaultCrn string
    (String) Type of backup supported.
    backup_type str
    (String) CRN of the backuo vault.
    bucket_name str
    id str
    initial_delete_after_days float
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    policy_id str
    policy_name str
    (String) Name of the policy.
    target_backup_vault_crn str
    (String) Type of backup supported.
    backupType String
    (String) CRN of the backuo vault.
    bucketName String
    id String
    initialDeleteAfterDays Number
    (Int) Number of days after which the data contained in a RecoveryRange will be deleted.
    policyId String
    policyName String
    (String) Name of the policy.
    targetBackupVaultCrn String
    (String) Type of backup supported.

    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.80.0-beta0 published on Tuesday, Jun 24, 2025 by ibm-cloud