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

ibm.CosBackupVault

Explore with Pulumi AI

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

    Creates a backup vault to store bucket backup data.


    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const cosGroup = ibm.getResourceGroup({
        name: "cos-resource-group",
    });
    const backup_vault = new ibm.CosBackupVault("backup-vault", {
        activityTrackingManagementEvents: true,
        backupVaultName: "backup_vault_name",
        kmsKeyCrn: "crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d",
        metricsMonitoringUsageMetrics: true,
        region: "us",
        serviceInstanceId: "cos_instance_id to create backup vault",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    cos_group = ibm.get_resource_group(name="cos-resource-group")
    backup_vault = ibm.CosBackupVault("backup-vault",
        activity_tracking_management_events=True,
        backup_vault_name="backup_vault_name",
        kms_key_crn="crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d",
        metrics_monitoring_usage_metrics=True,
        region="us",
        service_instance_id="cos_instance_id to create backup vault")
    
    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.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
    			Name: pulumi.StringRef("cos-resource-group"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewCosBackupVault(ctx, "backup-vault", &ibm.CosBackupVaultArgs{
    			ActivityTrackingManagementEvents: pulumi.Bool(true),
    			BackupVaultName:                  pulumi.String("backup_vault_name"),
    			KmsKeyCrn:                        pulumi.String("crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d"),
    			MetricsMonitoringUsageMetrics:    pulumi.Bool(true),
    			Region:                           pulumi.String("us"),
    			ServiceInstanceId:                pulumi.String("cos_instance_id to create backup vault"),
    		})
    		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 cosGroup = Ibm.GetResourceGroup.Invoke(new()
        {
            Name = "cos-resource-group",
        });
    
        var backup_vault = new Ibm.CosBackupVault("backup-vault", new()
        {
            ActivityTrackingManagementEvents = true,
            BackupVaultName = "backup_vault_name",
            KmsKeyCrn = "crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d",
            MetricsMonitoringUsageMetrics = true,
            Region = "us",
            ServiceInstanceId = "cos_instance_id to create backup vault",
        });
    
    });
    
    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.GetResourceGroupArgs;
    import com.pulumi.ibm.CosBackupVault;
    import com.pulumi.ibm.CosBackupVaultArgs;
    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 cosGroup = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
                .name("cos-resource-group")
                .build());
    
            var backup_vault = new CosBackupVault("backup-vault", CosBackupVaultArgs.builder()
                .activityTrackingManagementEvents(true)
                .backupVaultName("backup_vault_name")
                .kmsKeyCrn("crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d")
                .metricsMonitoringUsageMetrics(true)
                .region("us")
                .serviceInstanceId("cos_instance_id to create backup vault")
                .build());
    
        }
    }
    
    resources:
      backup-vault:
        type: ibm:CosBackupVault
        properties:
          activityTrackingManagementEvents: true
          backupVaultName: backup_vault_name
          kmsKeyCrn: crn:v1:staging:public:kms:us-south:a/997xxxxxxxxxxxxxxxxxxxxxx54:5xxxxxxxa-fxxb-4xx8-9xx4-f1xxxxxxxxx5:key:af5667d5-dxx5-4xxf-8xxf-exxxxxxxf1d
          metricsMonitoringUsageMetrics: true
          region: us
          serviceInstanceId: cos_instance_id to create backup vault
    variables:
      cosGroup:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            name: cos-resource-group
    

    Create CosBackupVault Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CosBackupVault(name: string, args: CosBackupVaultArgs, opts?: CustomResourceOptions);
    @overload
    def CosBackupVault(resource_name: str,
                       args: CosBackupVaultArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CosBackupVault(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       backup_vault_name: Optional[str] = None,
                       region: Optional[str] = None,
                       service_instance_id: Optional[str] = None,
                       activity_tracking_management_events: Optional[bool] = None,
                       cos_backup_vault_id: Optional[str] = None,
                       kms_key_crn: Optional[str] = None,
                       metrics_monitoring_usage_metrics: Optional[bool] = None,
                       timeouts: Optional[CosBackupVaultTimeoutsArgs] = None)
    func NewCosBackupVault(ctx *Context, name string, args CosBackupVaultArgs, opts ...ResourceOption) (*CosBackupVault, error)
    public CosBackupVault(string name, CosBackupVaultArgs args, CustomResourceOptions? opts = null)
    public CosBackupVault(String name, CosBackupVaultArgs args)
    public CosBackupVault(String name, CosBackupVaultArgs args, CustomResourceOptions options)
    
    type: ibm:CosBackupVault
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CosBackupVaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CosBackupVaultArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CosBackupVaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CosBackupVaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CosBackupVaultArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cosBackupVaultResource = new Ibm.CosBackupVault("cosBackupVaultResource", new()
    {
        BackupVaultName = "string",
        Region = "string",
        ServiceInstanceId = "string",
        ActivityTrackingManagementEvents = false,
        CosBackupVaultId = "string",
        KmsKeyCrn = "string",
        MetricsMonitoringUsageMetrics = false,
        Timeouts = new Ibm.Inputs.CosBackupVaultTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewCosBackupVault(ctx, "cosBackupVaultResource", &ibm.CosBackupVaultArgs{
    	BackupVaultName:                  pulumi.String("string"),
    	Region:                           pulumi.String("string"),
    	ServiceInstanceId:                pulumi.String("string"),
    	ActivityTrackingManagementEvents: pulumi.Bool(false),
    	CosBackupVaultId:                 pulumi.String("string"),
    	KmsKeyCrn:                        pulumi.String("string"),
    	MetricsMonitoringUsageMetrics:    pulumi.Bool(false),
    	Timeouts: &ibm.CosBackupVaultTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var cosBackupVaultResource = new CosBackupVault("cosBackupVaultResource", CosBackupVaultArgs.builder()
        .backupVaultName("string")
        .region("string")
        .serviceInstanceId("string")
        .activityTrackingManagementEvents(false)
        .cosBackupVaultId("string")
        .kmsKeyCrn("string")
        .metricsMonitoringUsageMetrics(false)
        .timeouts(CosBackupVaultTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    cos_backup_vault_resource = ibm.CosBackupVault("cosBackupVaultResource",
        backup_vault_name="string",
        region="string",
        service_instance_id="string",
        activity_tracking_management_events=False,
        cos_backup_vault_id="string",
        kms_key_crn="string",
        metrics_monitoring_usage_metrics=False,
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const cosBackupVaultResource = new ibm.CosBackupVault("cosBackupVaultResource", {
        backupVaultName: "string",
        region: "string",
        serviceInstanceId: "string",
        activityTrackingManagementEvents: false,
        cosBackupVaultId: "string",
        kmsKeyCrn: "string",
        metricsMonitoringUsageMetrics: false,
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:CosBackupVault
    properties:
        activityTrackingManagementEvents: false
        backupVaultName: string
        cosBackupVaultId: string
        kmsKeyCrn: string
        metricsMonitoringUsageMetrics: false
        region: string
        serviceInstanceId: string
        timeouts:
            create: string
            delete: string
            update: string
    

    CosBackupVault Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CosBackupVault resource accepts the following input properties:

    BackupVaultName string
    Name of the backup vault.
    Region string
    The location of the COS backup vault.
    ServiceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    ActivityTrackingManagementEvents bool
    Whether to send notification for the management events for backup vault.
    CosBackupVaultId string
    (String) The ID of the backup vault.
    KmsKeyCrn string
    Crn of the key protect root key.
    MetricsMonitoringUsageMetrics bool
    Whether usage metrics are collected for this backup vault.
    Timeouts CosBackupVaultTimeouts
    BackupVaultName string
    Name of the backup vault.
    Region string
    The location of the COS backup vault.
    ServiceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    ActivityTrackingManagementEvents bool
    Whether to send notification for the management events for backup vault.
    CosBackupVaultId string
    (String) The ID of the backup vault.
    KmsKeyCrn string
    Crn of the key protect root key.
    MetricsMonitoringUsageMetrics bool
    Whether usage metrics are collected for this backup vault.
    Timeouts CosBackupVaultTimeoutsArgs
    backupVaultName String
    Name of the backup vault.
    region String
    The location of the COS backup vault.
    serviceInstanceId String
    CRN of the COS instance where the backup vault is to be created.
    activityTrackingManagementEvents Boolean
    Whether to send notification for the management events for backup vault.
    cosBackupVaultId String
    (String) The ID of the backup vault.
    kmsKeyCrn String
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics Boolean
    Whether usage metrics are collected for this backup vault.
    timeouts CosBackupVaultTimeouts
    backupVaultName string
    Name of the backup vault.
    region string
    The location of the COS backup vault.
    serviceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    activityTrackingManagementEvents boolean
    Whether to send notification for the management events for backup vault.
    cosBackupVaultId string
    (String) The ID of the backup vault.
    kmsKeyCrn string
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics boolean
    Whether usage metrics are collected for this backup vault.
    timeouts CosBackupVaultTimeouts
    backup_vault_name str
    Name of the backup vault.
    region str
    The location of the COS backup vault.
    service_instance_id str
    CRN of the COS instance where the backup vault is to be created.
    activity_tracking_management_events bool
    Whether to send notification for the management events for backup vault.
    cos_backup_vault_id str
    (String) The ID of the backup vault.
    kms_key_crn str
    Crn of the key protect root key.
    metrics_monitoring_usage_metrics bool
    Whether usage metrics are collected for this backup vault.
    timeouts CosBackupVaultTimeoutsArgs
    backupVaultName String
    Name of the backup vault.
    region String
    The location of the COS backup vault.
    serviceInstanceId String
    CRN of the COS instance where the backup vault is to be created.
    activityTrackingManagementEvents Boolean
    Whether to send notification for the management events for backup vault.
    cosBackupVaultId String
    (String) The ID of the backup vault.
    kmsKeyCrn String
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics Boolean
    Whether usage metrics are collected for this backup vault.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CosBackupVault resource produces the following output properties:

    BackupVaultCrn string
    CRN of resource instance
    Id string
    The provider-assigned unique ID for this managed resource.
    BackupVaultCrn string
    CRN of resource instance
    Id string
    The provider-assigned unique ID for this managed resource.
    backupVaultCrn String
    CRN of resource instance
    id String
    The provider-assigned unique ID for this managed resource.
    backupVaultCrn string
    CRN of resource instance
    id string
    The provider-assigned unique ID for this managed resource.
    backup_vault_crn str
    CRN of resource instance
    id str
    The provider-assigned unique ID for this managed resource.
    backupVaultCrn String
    CRN of resource instance
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CosBackupVault Resource

    Get an existing CosBackupVault resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CosBackupVaultState, opts?: CustomResourceOptions): CosBackupVault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            activity_tracking_management_events: Optional[bool] = None,
            backup_vault_crn: Optional[str] = None,
            backup_vault_name: Optional[str] = None,
            cos_backup_vault_id: Optional[str] = None,
            kms_key_crn: Optional[str] = None,
            metrics_monitoring_usage_metrics: Optional[bool] = None,
            region: Optional[str] = None,
            service_instance_id: Optional[str] = None,
            timeouts: Optional[CosBackupVaultTimeoutsArgs] = None) -> CosBackupVault
    func GetCosBackupVault(ctx *Context, name string, id IDInput, state *CosBackupVaultState, opts ...ResourceOption) (*CosBackupVault, error)
    public static CosBackupVault Get(string name, Input<string> id, CosBackupVaultState? state, CustomResourceOptions? opts = null)
    public static CosBackupVault get(String name, Output<String> id, CosBackupVaultState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CosBackupVault    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ActivityTrackingManagementEvents bool
    Whether to send notification for the management events for backup vault.
    BackupVaultCrn string
    CRN of resource instance
    BackupVaultName string
    Name of the backup vault.
    CosBackupVaultId string
    (String) The ID of the backup vault.
    KmsKeyCrn string
    Crn of the key protect root key.
    MetricsMonitoringUsageMetrics bool
    Whether usage metrics are collected for this backup vault.
    Region string
    The location of the COS backup vault.
    ServiceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    Timeouts CosBackupVaultTimeouts
    ActivityTrackingManagementEvents bool
    Whether to send notification for the management events for backup vault.
    BackupVaultCrn string
    CRN of resource instance
    BackupVaultName string
    Name of the backup vault.
    CosBackupVaultId string
    (String) The ID of the backup vault.
    KmsKeyCrn string
    Crn of the key protect root key.
    MetricsMonitoringUsageMetrics bool
    Whether usage metrics are collected for this backup vault.
    Region string
    The location of the COS backup vault.
    ServiceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    Timeouts CosBackupVaultTimeoutsArgs
    activityTrackingManagementEvents Boolean
    Whether to send notification for the management events for backup vault.
    backupVaultCrn String
    CRN of resource instance
    backupVaultName String
    Name of the backup vault.
    cosBackupVaultId String
    (String) The ID of the backup vault.
    kmsKeyCrn String
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics Boolean
    Whether usage metrics are collected for this backup vault.
    region String
    The location of the COS backup vault.
    serviceInstanceId String
    CRN of the COS instance where the backup vault is to be created.
    timeouts CosBackupVaultTimeouts
    activityTrackingManagementEvents boolean
    Whether to send notification for the management events for backup vault.
    backupVaultCrn string
    CRN of resource instance
    backupVaultName string
    Name of the backup vault.
    cosBackupVaultId string
    (String) The ID of the backup vault.
    kmsKeyCrn string
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics boolean
    Whether usage metrics are collected for this backup vault.
    region string
    The location of the COS backup vault.
    serviceInstanceId string
    CRN of the COS instance where the backup vault is to be created.
    timeouts CosBackupVaultTimeouts
    activity_tracking_management_events bool
    Whether to send notification for the management events for backup vault.
    backup_vault_crn str
    CRN of resource instance
    backup_vault_name str
    Name of the backup vault.
    cos_backup_vault_id str
    (String) The ID of the backup vault.
    kms_key_crn str
    Crn of the key protect root key.
    metrics_monitoring_usage_metrics bool
    Whether usage metrics are collected for this backup vault.
    region str
    The location of the COS backup vault.
    service_instance_id str
    CRN of the COS instance where the backup vault is to be created.
    timeouts CosBackupVaultTimeoutsArgs
    activityTrackingManagementEvents Boolean
    Whether to send notification for the management events for backup vault.
    backupVaultCrn String
    CRN of resource instance
    backupVaultName String
    Name of the backup vault.
    cosBackupVaultId String
    (String) The ID of the backup vault.
    kmsKeyCrn String
    Crn of the key protect root key.
    metricsMonitoringUsageMetrics Boolean
    Whether usage metrics are collected for this backup vault.
    region String
    The location of the COS backup vault.
    serviceInstanceId String
    CRN of the COS instance where the backup vault is to be created.
    timeouts Property Map

    Supporting Types

    CosBackupVaultTimeouts, CosBackupVaultTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    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