ibm.CosBackupVault
Explore with Pulumi AI
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:
- Backup
Vault stringName - Name of the backup vault.
- Region string
- The location of the COS backup vault.
- Service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- Activity
Tracking boolManagement Events - Whether to send notification for the management events for backup vault.
- Cos
Backup stringVault Id - (String) The ID of the backup vault.
- Kms
Key stringCrn - Crn of the key protect root key.
- Metrics
Monitoring boolUsage Metrics - Whether usage metrics are collected for this backup vault.
- Timeouts
Cos
Backup Vault Timeouts
- Backup
Vault stringName - Name of the backup vault.
- Region string
- The location of the COS backup vault.
- Service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- Activity
Tracking boolManagement Events - Whether to send notification for the management events for backup vault.
- Cos
Backup stringVault Id - (String) The ID of the backup vault.
- Kms
Key stringCrn - Crn of the key protect root key.
- Metrics
Monitoring boolUsage Metrics - Whether usage metrics are collected for this backup vault.
- Timeouts
Cos
Backup Vault Timeouts Args
- backup
Vault StringName - Name of the backup vault.
- region String
- The location of the COS backup vault.
- service
Instance StringId - CRN of the COS instance where the backup vault is to be created.
- activity
Tracking BooleanManagement Events - Whether to send notification for the management events for backup vault.
- cos
Backup StringVault Id - (String) The ID of the backup vault.
- kms
Key StringCrn - Crn of the key protect root key.
- metrics
Monitoring BooleanUsage Metrics - Whether usage metrics are collected for this backup vault.
- timeouts
Cos
Backup Vault Timeouts
- backup
Vault stringName - Name of the backup vault.
- region string
- The location of the COS backup vault.
- service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- activity
Tracking booleanManagement Events - Whether to send notification for the management events for backup vault.
- cos
Backup stringVault Id - (String) The ID of the backup vault.
- kms
Key stringCrn - Crn of the key protect root key.
- metrics
Monitoring booleanUsage Metrics - Whether usage metrics are collected for this backup vault.
- timeouts
Cos
Backup Vault Timeouts
- backup_
vault_ strname - Name of the backup vault.
- region str
- The location of the COS backup vault.
- service_
instance_ strid - CRN of the COS instance where the backup vault is to be created.
- activity_
tracking_ boolmanagement_ events - Whether to send notification for the management events for backup vault.
- cos_
backup_ strvault_ id - (String) The ID of the backup vault.
- kms_
key_ strcrn - Crn of the key protect root key.
- metrics_
monitoring_ boolusage_ metrics - Whether usage metrics are collected for this backup vault.
- timeouts
Cos
Backup Vault Timeouts Args
- backup
Vault StringName - Name of the backup vault.
- region String
- The location of the COS backup vault.
- service
Instance StringId - CRN of the COS instance where the backup vault is to be created.
- activity
Tracking BooleanManagement Events - Whether to send notification for the management events for backup vault.
- cos
Backup StringVault Id - (String) The ID of the backup vault.
- kms
Key StringCrn - Crn of the key protect root key.
- metrics
Monitoring BooleanUsage Metrics - 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:
- Backup
Vault stringCrn - CRN of resource instance
- Id string
- The provider-assigned unique ID for this managed resource.
- Backup
Vault stringCrn - CRN of resource instance
- Id string
- The provider-assigned unique ID for this managed resource.
- backup
Vault StringCrn - CRN of resource instance
- id String
- The provider-assigned unique ID for this managed resource.
- backup
Vault stringCrn - CRN of resource instance
- id string
- The provider-assigned unique ID for this managed resource.
- backup_
vault_ strcrn - CRN of resource instance
- id str
- The provider-assigned unique ID for this managed resource.
- backup
Vault StringCrn - 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.
- Activity
Tracking boolManagement Events - Whether to send notification for the management events for backup vault.
- Backup
Vault stringCrn - CRN of resource instance
- Backup
Vault stringName - Name of the backup vault.
- Cos
Backup stringVault Id - (String) The ID of the backup vault.
- Kms
Key stringCrn - Crn of the key protect root key.
- Metrics
Monitoring boolUsage Metrics - Whether usage metrics are collected for this backup vault.
- Region string
- The location of the COS backup vault.
- Service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- Timeouts
Cos
Backup Vault Timeouts
- Activity
Tracking boolManagement Events - Whether to send notification for the management events for backup vault.
- Backup
Vault stringCrn - CRN of resource instance
- Backup
Vault stringName - Name of the backup vault.
- Cos
Backup stringVault Id - (String) The ID of the backup vault.
- Kms
Key stringCrn - Crn of the key protect root key.
- Metrics
Monitoring boolUsage Metrics - Whether usage metrics are collected for this backup vault.
- Region string
- The location of the COS backup vault.
- Service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- Timeouts
Cos
Backup Vault Timeouts Args
- activity
Tracking BooleanManagement Events - Whether to send notification for the management events for backup vault.
- backup
Vault StringCrn - CRN of resource instance
- backup
Vault StringName - Name of the backup vault.
- cos
Backup StringVault Id - (String) The ID of the backup vault.
- kms
Key StringCrn - Crn of the key protect root key.
- metrics
Monitoring BooleanUsage Metrics - Whether usage metrics are collected for this backup vault.
- region String
- The location of the COS backup vault.
- service
Instance StringId - CRN of the COS instance where the backup vault is to be created.
- timeouts
Cos
Backup Vault Timeouts
- activity
Tracking booleanManagement Events - Whether to send notification for the management events for backup vault.
- backup
Vault stringCrn - CRN of resource instance
- backup
Vault stringName - Name of the backup vault.
- cos
Backup stringVault Id - (String) The ID of the backup vault.
- kms
Key stringCrn - Crn of the key protect root key.
- metrics
Monitoring booleanUsage Metrics - Whether usage metrics are collected for this backup vault.
- region string
- The location of the COS backup vault.
- service
Instance stringId - CRN of the COS instance where the backup vault is to be created.
- timeouts
Cos
Backup Vault Timeouts
- activity_
tracking_ boolmanagement_ events - Whether to send notification for the management events for backup vault.
- backup_
vault_ strcrn - CRN of resource instance
- backup_
vault_ strname - Name of the backup vault.
- cos_
backup_ strvault_ id - (String) The ID of the backup vault.
- kms_
key_ strcrn - Crn of the key protect root key.
- metrics_
monitoring_ boolusage_ metrics - Whether usage metrics are collected for this backup vault.
- region str
- The location of the COS backup vault.
- service_
instance_ strid - CRN of the COS instance where the backup vault is to be created.
- timeouts
Cos
Backup Vault Timeouts Args
- activity
Tracking BooleanManagement Events - Whether to send notification for the management events for backup vault.
- backup
Vault StringCrn - CRN of resource instance
- backup
Vault StringName - Name of the backup vault.
- cos
Backup StringVault Id - (String) The ID of the backup vault.
- kms
Key StringCrn - Crn of the key protect root key.
- metrics
Monitoring BooleanUsage Metrics - Whether usage metrics are collected for this backup vault.
- region String
- The location of the COS backup vault.
- service
Instance StringId - CRN of the COS instance where the backup vault is to be created.
- timeouts Property Map
Supporting Types
CosBackupVaultTimeouts, CosBackupVaultTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.