tencentcloud.KubernetesBackupStorageLocation
Explore with Pulumi AI
Provide a resource to create tke backup storage location.
NOTE: To create this resource, you need to create a cos bucket with prefix “tke-backup” in advance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleBackup = new tencentcloud.KubernetesBackupStorageLocation("exampleBackup", {
bucket: "tke-backup-example-1",
storageRegion: "ap-guangzhou",
});
// region of you pre-created COS bucket
import pulumi
import pulumi_tencentcloud as tencentcloud
example_backup = tencentcloud.KubernetesBackupStorageLocation("exampleBackup",
bucket="tke-backup-example-1",
storage_region="ap-guangzhou")
# region of you pre-created COS bucket
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewKubernetesBackupStorageLocation(ctx, "exampleBackup", &tencentcloud.KubernetesBackupStorageLocationArgs{
Bucket: pulumi.String("tke-backup-example-1"),
StorageRegion: pulumi.String("ap-guangzhou"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var exampleBackup = new Tencentcloud.KubernetesBackupStorageLocation("exampleBackup", new()
{
Bucket = "tke-backup-example-1",
StorageRegion = "ap-guangzhou",
});
// region of you pre-created COS bucket
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesBackupStorageLocation;
import com.pulumi.tencentcloud.KubernetesBackupStorageLocationArgs;
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) {
var exampleBackup = new KubernetesBackupStorageLocation("exampleBackup", KubernetesBackupStorageLocationArgs.builder()
.bucket("tke-backup-example-1")
.storageRegion("ap-guangzhou")
.build());
// region of you pre-created COS bucket
}
}
resources:
exampleBackup:
type: tencentcloud:KubernetesBackupStorageLocation
properties:
bucket: tke-backup-example-1
storageRegion: ap-guangzhou
Create KubernetesBackupStorageLocation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KubernetesBackupStorageLocation(name: string, args: KubernetesBackupStorageLocationArgs, opts?: CustomResourceOptions);
@overload
def KubernetesBackupStorageLocation(resource_name: str,
args: KubernetesBackupStorageLocationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KubernetesBackupStorageLocation(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
storage_region: Optional[str] = None,
kubernetes_backup_storage_location_id: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None)
func NewKubernetesBackupStorageLocation(ctx *Context, name string, args KubernetesBackupStorageLocationArgs, opts ...ResourceOption) (*KubernetesBackupStorageLocation, error)
public KubernetesBackupStorageLocation(string name, KubernetesBackupStorageLocationArgs args, CustomResourceOptions? opts = null)
public KubernetesBackupStorageLocation(String name, KubernetesBackupStorageLocationArgs args)
public KubernetesBackupStorageLocation(String name, KubernetesBackupStorageLocationArgs args, CustomResourceOptions options)
type: tencentcloud:KubernetesBackupStorageLocation
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 KubernetesBackupStorageLocationArgs
- 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 KubernetesBackupStorageLocationArgs
- 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 KubernetesBackupStorageLocationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KubernetesBackupStorageLocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KubernetesBackupStorageLocationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KubernetesBackupStorageLocation 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 KubernetesBackupStorageLocation resource accepts the following input properties:
- Bucket string
- Name of the bucket.
- Storage
Region string - Region of the storage.
- Kubernetes
Backup stringStorage Location Id - ID of the resource.
- Name string
- Name of the backup storage location.
- Path string
- Prefix of the bucket.
- Bucket string
- Name of the bucket.
- Storage
Region string - Region of the storage.
- Kubernetes
Backup stringStorage Location Id - ID of the resource.
- Name string
- Name of the backup storage location.
- Path string
- Prefix of the bucket.
- bucket String
- Name of the bucket.
- storage
Region String - Region of the storage.
- kubernetes
Backup StringStorage Location Id - ID of the resource.
- name String
- Name of the backup storage location.
- path String
- Prefix of the bucket.
- bucket string
- Name of the bucket.
- storage
Region string - Region of the storage.
- kubernetes
Backup stringStorage Location Id - ID of the resource.
- name string
- Name of the backup storage location.
- path string
- Prefix of the bucket.
- bucket str
- Name of the bucket.
- storage_
region str - Region of the storage.
- kubernetes_
backup_ strstorage_ location_ id - ID of the resource.
- name str
- Name of the backup storage location.
- path str
- Prefix of the bucket.
- bucket String
- Name of the bucket.
- storage
Region String - Region of the storage.
- kubernetes
Backup StringStorage Location Id - ID of the resource.
- name String
- Name of the backup storage location.
- path String
- Prefix of the bucket.
Outputs
All input properties are implicitly available as output properties. Additionally, the KubernetesBackupStorageLocation resource produces the following output properties:
Look up Existing KubernetesBackupStorageLocation Resource
Get an existing KubernetesBackupStorageLocation 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?: KubernetesBackupStorageLocationState, opts?: CustomResourceOptions): KubernetesBackupStorageLocation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
kubernetes_backup_storage_location_id: Optional[str] = None,
message: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None,
state: Optional[str] = None,
storage_region: Optional[str] = None) -> KubernetesBackupStorageLocation
func GetKubernetesBackupStorageLocation(ctx *Context, name string, id IDInput, state *KubernetesBackupStorageLocationState, opts ...ResourceOption) (*KubernetesBackupStorageLocation, error)
public static KubernetesBackupStorageLocation Get(string name, Input<string> id, KubernetesBackupStorageLocationState? state, CustomResourceOptions? opts = null)
public static KubernetesBackupStorageLocation get(String name, Output<String> id, KubernetesBackupStorageLocationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:KubernetesBackupStorageLocation 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.
- Bucket string
- Name of the bucket.
- Kubernetes
Backup stringStorage Location Id - ID of the resource.
- Message string
- Message of the backup storage location.
- Name string
- Name of the backup storage location.
- Path string
- Prefix of the bucket.
- State string
- State of the backup storage location.
- Storage
Region string - Region of the storage.
- Bucket string
- Name of the bucket.
- Kubernetes
Backup stringStorage Location Id - ID of the resource.
- Message string
- Message of the backup storage location.
- Name string
- Name of the backup storage location.
- Path string
- Prefix of the bucket.
- State string
- State of the backup storage location.
- Storage
Region string - Region of the storage.
- bucket String
- Name of the bucket.
- kubernetes
Backup StringStorage Location Id - ID of the resource.
- message String
- Message of the backup storage location.
- name String
- Name of the backup storage location.
- path String
- Prefix of the bucket.
- state String
- State of the backup storage location.
- storage
Region String - Region of the storage.
- bucket string
- Name of the bucket.
- kubernetes
Backup stringStorage Location Id - ID of the resource.
- message string
- Message of the backup storage location.
- name string
- Name of the backup storage location.
- path string
- Prefix of the bucket.
- state string
- State of the backup storage location.
- storage
Region string - Region of the storage.
- bucket str
- Name of the bucket.
- kubernetes_
backup_ strstorage_ location_ id - ID of the resource.
- message str
- Message of the backup storage location.
- name str
- Name of the backup storage location.
- path str
- Prefix of the bucket.
- state str
- State of the backup storage location.
- storage_
region str - Region of the storage.
- bucket String
- Name of the bucket.
- kubernetes
Backup StringStorage Location Id - ID of the resource.
- message String
- Message of the backup storage location.
- name String
- Name of the backup storage location.
- path String
- Prefix of the bucket.
- state String
- State of the backup storage location.
- storage
Region String - Region of the storage.
Import
tke backup storage location can be imported, e.g.
$ pulumi import tencentcloud:index/kubernetesBackupStorageLocation:KubernetesBackupStorageLocation test xxx
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.