published on Monday, Mar 9, 2026 by Byteplus
published on Monday, Mar 9, 2026 by Byteplus
用户管理密钥的集合,用户将相同类型或用途的密钥放在同一密钥环中以便于管理。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const kmskeyringDemo = new bytepluscc.kms.KeyRing("kmskeyringDemo", {
description: "this is a test update",
keyringName: "ccapi-test",
keyringType: "CustomKeyring",
projectName: "default",
});
import pulumi
import pulumi_bytepluscc as bytepluscc
kmskeyring_demo = bytepluscc.kms.KeyRing("kmskeyringDemo",
description="this is a test update",
keyring_name="ccapi-test",
keyring_type="CustomKeyring",
project_name="default")
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/kms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.NewKeyRing(ctx, "kmskeyringDemo", &kms.KeyRingArgs{
Description: pulumi.String("this is a test update"),
KeyringName: pulumi.String("ccapi-test"),
KeyringType: pulumi.String("CustomKeyring"),
ProjectName: pulumi.String("default"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var kmskeyringDemo = new Bytepluscc.Kms.KeyRing("kmskeyringDemo", new()
{
Description = "this is a test update",
KeyringName = "ccapi-test",
KeyringType = "CustomKeyring",
ProjectName = "default",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.kms.KeyRing;
import com.byteplus.bytepluscc.kms.KeyRingArgs;
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 kmskeyringDemo = new KeyRing("kmskeyringDemo", KeyRingArgs.builder()
.description("this is a test update")
.keyringName("ccapi-test")
.keyringType("CustomKeyring")
.projectName("default")
.build());
}
}
resources:
kmskeyringDemo:
type: bytepluscc:kms:KeyRing
properties:
description: this is a test update
keyringName: ccapi-test
keyringType: CustomKeyring
projectName: default
Create KeyRing Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyRing(name: string, args: KeyRingArgs, opts?: CustomResourceOptions);@overload
def KeyRing(resource_name: str,
args: KeyRingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KeyRing(resource_name: str,
opts: Optional[ResourceOptions] = None,
keyring_name: Optional[str] = None,
description: Optional[str] = None,
keyring_type: Optional[str] = None,
project_name: Optional[str] = None)func NewKeyRing(ctx *Context, name string, args KeyRingArgs, opts ...ResourceOption) (*KeyRing, error)public KeyRing(string name, KeyRingArgs args, CustomResourceOptions? opts = null)
public KeyRing(String name, KeyRingArgs args)
public KeyRing(String name, KeyRingArgs args, CustomResourceOptions options)
type: bytepluscc:kms:KeyRing
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 KeyRingArgs
- 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 KeyRingArgs
- 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 KeyRingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyRingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyRingArgs
- 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 keyRingResource = new Bytepluscc.Kms.KeyRing("keyRingResource", new()
{
KeyringName = "string",
Description = "string",
KeyringType = "string",
ProjectName = "string",
});
example, err := kms.NewKeyRing(ctx, "keyRingResource", &kms.KeyRingArgs{
KeyringName: pulumi.String("string"),
Description: pulumi.String("string"),
KeyringType: pulumi.String("string"),
ProjectName: pulumi.String("string"),
})
var keyRingResource = new KeyRing("keyRingResource", KeyRingArgs.builder()
.keyringName("string")
.description("string")
.keyringType("string")
.projectName("string")
.build());
key_ring_resource = bytepluscc.kms.KeyRing("keyRingResource",
keyring_name="string",
description="string",
keyring_type="string",
project_name="string")
const keyRingResource = new bytepluscc.kms.KeyRing("keyRingResource", {
keyringName: "string",
description: "string",
keyringType: "string",
projectName: "string",
});
type: bytepluscc:kms:KeyRing
properties:
description: string
keyringName: string
keyringType: string
projectName: string
KeyRing 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 KeyRing resource accepts the following input properties:
- Keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- Description string
- 密钥环描述,长度为 0 - 8192 个字符。
- Keyring
Type string - 密钥环类型,取值:CustomKeyring。
- Project
Name string - 项目名称,默认值:default。
- Keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- Description string
- 密钥环描述,长度为 0 - 8192 个字符。
- Keyring
Type string - 密钥环类型,取值:CustomKeyring。
- Project
Name string - 项目名称,默认值:default。
- keyring
Name String - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- description String
- 密钥环描述,长度为 0 - 8192 个字符。
- keyring
Type String - 密钥环类型,取值:CustomKeyring。
- project
Name String - 项目名称,默认值:default。
- keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- description string
- 密钥环描述,长度为 0 - 8192 个字符。
- keyring
Type string - 密钥环类型,取值:CustomKeyring。
- project
Name string - 项目名称,默认值:default。
- keyring_
name str - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- description str
- 密钥环描述,长度为 0 - 8192 个字符。
- keyring_
type str - 密钥环类型,取值:CustomKeyring。
- project_
name str - 项目名称,默认值:default。
- keyring
Name String - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- description String
- 密钥环描述,长度为 0 - 8192 个字符。
- keyring
Type String - 密钥环类型,取值:CustomKeyring。
- project
Name String - 项目名称,默认值:default。
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyRing resource produces the following output properties:
- Create
Date int - 密钥环创建日期。
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Count int - 密钥环密钥次数。
- Key
Ring stringId - 密钥环唯一标识符,UUID形式。
- Uid string
- 密钥环租户ID。
- Update
Date int - 密钥环更新日期。
- Create
Date int - 密钥环创建日期。
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Count int - 密钥环密钥次数。
- Key
Ring stringId - 密钥环唯一标识符,UUID形式。
- Uid string
- 密钥环租户ID。
- Update
Date int - 密钥环更新日期。
- create
Date Integer - 密钥环创建日期。
- id String
- The provider-assigned unique ID for this managed resource.
- key
Count Integer - 密钥环密钥次数。
- key
Ring StringId - 密钥环唯一标识符,UUID形式。
- uid String
- 密钥环租户ID。
- update
Date Integer - 密钥环更新日期。
- create
Date number - 密钥环创建日期。
- id string
- The provider-assigned unique ID for this managed resource.
- key
Count number - 密钥环密钥次数。
- key
Ring stringId - 密钥环唯一标识符,UUID形式。
- uid string
- 密钥环租户ID。
- update
Date number - 密钥环更新日期。
- create_
date int - 密钥环创建日期。
- id str
- The provider-assigned unique ID for this managed resource.
- key_
count int - 密钥环密钥次数。
- key_
ring_ strid - 密钥环唯一标识符,UUID形式。
- uid str
- 密钥环租户ID。
- update_
date int - 密钥环更新日期。
- create
Date Number - 密钥环创建日期。
- id String
- The provider-assigned unique ID for this managed resource.
- key
Count Number - 密钥环密钥次数。
- key
Ring StringId - 密钥环唯一标识符,UUID形式。
- uid String
- 密钥环租户ID。
- update
Date Number - 密钥环更新日期。
Look up Existing KeyRing Resource
Get an existing KeyRing 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?: KeyRingState, opts?: CustomResourceOptions): KeyRing@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_date: Optional[int] = None,
description: Optional[str] = None,
key_count: Optional[int] = None,
key_ring_id: Optional[str] = None,
keyring_name: Optional[str] = None,
keyring_type: Optional[str] = None,
project_name: Optional[str] = None,
uid: Optional[str] = None,
update_date: Optional[int] = None) -> KeyRingfunc GetKeyRing(ctx *Context, name string, id IDInput, state *KeyRingState, opts ...ResourceOption) (*KeyRing, error)public static KeyRing Get(string name, Input<string> id, KeyRingState? state, CustomResourceOptions? opts = null)public static KeyRing get(String name, Output<String> id, KeyRingState state, CustomResourceOptions options)resources: _: type: bytepluscc:kms:KeyRing 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.
- Create
Date int - 密钥环创建日期。
- Description string
- 密钥环描述,长度为 0 - 8192 个字符。
- Key
Count int - 密钥环密钥次数。
- Key
Ring stringId - 密钥环唯一标识符,UUID形式。
- Keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- Keyring
Type string - 密钥环类型,取值:CustomKeyring。
- Project
Name string - 项目名称,默认值:default。
- Uid string
- 密钥环租户ID。
- Update
Date int - 密钥环更新日期。
- Create
Date int - 密钥环创建日期。
- Description string
- 密钥环描述,长度为 0 - 8192 个字符。
- Key
Count int - 密钥环密钥次数。
- Key
Ring stringId - 密钥环唯一标识符,UUID形式。
- Keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- Keyring
Type string - 密钥环类型,取值:CustomKeyring。
- Project
Name string - 项目名称,默认值:default。
- Uid string
- 密钥环租户ID。
- Update
Date int - 密钥环更新日期。
- create
Date Integer - 密钥环创建日期。
- description String
- 密钥环描述,长度为 0 - 8192 个字符。
- key
Count Integer - 密钥环密钥次数。
- key
Ring StringId - 密钥环唯一标识符,UUID形式。
- keyring
Name String - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- keyring
Type String - 密钥环类型,取值:CustomKeyring。
- project
Name String - 项目名称,默认值:default。
- uid String
- 密钥环租户ID。
- update
Date Integer - 密钥环更新日期。
- create
Date number - 密钥环创建日期。
- description string
- 密钥环描述,长度为 0 - 8192 个字符。
- key
Count number - 密钥环密钥次数。
- key
Ring stringId - 密钥环唯一标识符,UUID形式。
- keyring
Name string - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- keyring
Type string - 密钥环类型,取值:CustomKeyring。
- project
Name string - 项目名称,默认值:default。
- uid string
- 密钥环租户ID。
- update
Date number - 密钥环更新日期。
- create_
date int - 密钥环创建日期。
- description str
- 密钥环描述,长度为 0 - 8192 个字符。
- key_
count int - 密钥环密钥次数。
- key_
ring_ strid - 密钥环唯一标识符,UUID形式。
- keyring_
name str - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- keyring_
type str - 密钥环类型,取值:CustomKeyring。
- project_
name str - 项目名称,默认值:default。
- uid str
- 密钥环租户ID。
- update_
date int - 密钥环更新日期。
- create
Date Number - 密钥环创建日期。
- description String
- 密钥环描述,长度为 0 - 8192 个字符。
- key
Count Number - 密钥环密钥次数。
- key
Ring StringId - 密钥环唯一标识符,UUID形式。
- keyring
Name String - 密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
- keyring
Type String - 密钥环类型,取值:CustomKeyring。
- project
Name String - 项目名称,默认值:default。
- uid String
- 密钥环租户ID。
- update
Date Number - 密钥环更新日期。
Import
$ pulumi import bytepluscc:kms/keyRing:KeyRing example "key_ring_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Monday, Mar 9, 2026 by Byteplus
