1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. kms
  5. KeyRing
Viewing docs for bytepluscc v0.0.16
published on Monday, Mar 9, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.16
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:

    KeyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    Description string
    密钥环描述,长度为 0 - 8192 个字符。
    KeyringType string
    密钥环类型,取值:CustomKeyring。
    ProjectName string
    项目名称,默认值:default。
    KeyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    Description string
    密钥环描述,长度为 0 - 8192 个字符。
    KeyringType string
    密钥环类型,取值:CustomKeyring。
    ProjectName string
    项目名称,默认值:default。
    keyringName String
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    description String
    密钥环描述,长度为 0 - 8192 个字符。
    keyringType String
    密钥环类型,取值:CustomKeyring。
    projectName String
    项目名称,默认值:default。
    keyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    description string
    密钥环描述,长度为 0 - 8192 个字符。
    keyringType string
    密钥环类型,取值:CustomKeyring。
    projectName string
    项目名称,默认值:default。
    keyring_name str
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    description str
    密钥环描述,长度为 0 - 8192 个字符。
    keyring_type str
    密钥环类型,取值:CustomKeyring。
    project_name str
    项目名称,默认值:default。
    keyringName String
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    description String
    密钥环描述,长度为 0 - 8192 个字符。
    keyringType String
    密钥环类型,取值:CustomKeyring。
    projectName String
    项目名称,默认值:default。

    Outputs

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

    CreateDate int
    密钥环创建日期。
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyCount int
    密钥环密钥次数。
    KeyRingId string
    密钥环唯一标识符,UUID形式。
    Uid string
    密钥环租户ID。
    UpdateDate int
    密钥环更新日期。
    CreateDate int
    密钥环创建日期。
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyCount int
    密钥环密钥次数。
    KeyRingId string
    密钥环唯一标识符,UUID形式。
    Uid string
    密钥环租户ID。
    UpdateDate int
    密钥环更新日期。
    createDate Integer
    密钥环创建日期。
    id String
    The provider-assigned unique ID for this managed resource.
    keyCount Integer
    密钥环密钥次数。
    keyRingId String
    密钥环唯一标识符,UUID形式。
    uid String
    密钥环租户ID。
    updateDate Integer
    密钥环更新日期。
    createDate number
    密钥环创建日期。
    id string
    The provider-assigned unique ID for this managed resource.
    keyCount number
    密钥环密钥次数。
    keyRingId string
    密钥环唯一标识符,UUID形式。
    uid string
    密钥环租户ID。
    updateDate number
    密钥环更新日期。
    create_date int
    密钥环创建日期。
    id str
    The provider-assigned unique ID for this managed resource.
    key_count int
    密钥环密钥次数。
    key_ring_id str
    密钥环唯一标识符,UUID形式。
    uid str
    密钥环租户ID。
    update_date int
    密钥环更新日期。
    createDate Number
    密钥环创建日期。
    id String
    The provider-assigned unique ID for this managed resource.
    keyCount Number
    密钥环密钥次数。
    keyRingId String
    密钥环唯一标识符,UUID形式。
    uid String
    密钥环租户ID。
    updateDate 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) -> KeyRing
    func 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.
    The following state arguments are supported:
    CreateDate int
    密钥环创建日期。
    Description string
    密钥环描述,长度为 0 - 8192 个字符。
    KeyCount int
    密钥环密钥次数。
    KeyRingId string
    密钥环唯一标识符,UUID形式。
    KeyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    KeyringType string
    密钥环类型,取值:CustomKeyring。
    ProjectName string
    项目名称,默认值:default。
    Uid string
    密钥环租户ID。
    UpdateDate int
    密钥环更新日期。
    CreateDate int
    密钥环创建日期。
    Description string
    密钥环描述,长度为 0 - 8192 个字符。
    KeyCount int
    密钥环密钥次数。
    KeyRingId string
    密钥环唯一标识符,UUID形式。
    KeyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    KeyringType string
    密钥环类型,取值:CustomKeyring。
    ProjectName string
    项目名称,默认值:default。
    Uid string
    密钥环租户ID。
    UpdateDate int
    密钥环更新日期。
    createDate Integer
    密钥环创建日期。
    description String
    密钥环描述,长度为 0 - 8192 个字符。
    keyCount Integer
    密钥环密钥次数。
    keyRingId String
    密钥环唯一标识符,UUID形式。
    keyringName String
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    keyringType String
    密钥环类型,取值:CustomKeyring。
    projectName String
    项目名称,默认值:default。
    uid String
    密钥环租户ID。
    updateDate Integer
    密钥环更新日期。
    createDate number
    密钥环创建日期。
    description string
    密钥环描述,长度为 0 - 8192 个字符。
    keyCount number
    密钥环密钥次数。
    keyRingId string
    密钥环唯一标识符,UUID形式。
    keyringName string
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    keyringType string
    密钥环类型,取值:CustomKeyring。
    projectName string
    项目名称,默认值:default。
    uid string
    密钥环租户ID。
    updateDate number
    密钥环更新日期。
    create_date int
    密钥环创建日期。
    description str
    密钥环描述,长度为 0 - 8192 个字符。
    key_count int
    密钥环密钥次数。
    key_ring_id str
    密钥环唯一标识符,UUID形式。
    keyring_name str
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    keyring_type str
    密钥环类型,取值:CustomKeyring。
    project_name str
    项目名称,默认值:default。
    uid str
    密钥环租户ID。
    update_date int
    密钥环更新日期。
    createDate Number
    密钥环创建日期。
    description String
    密钥环描述,长度为 0 - 8192 个字符。
    keyCount Number
    密钥环密钥次数。
    keyRingId String
    密钥环唯一标识符,UUID形式。
    keyringName String
    密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]。
    keyringType String
    密钥环类型,取值:CustomKeyring。
    projectName String
    项目名称,默认值:default。
    uid String
    密钥环租户ID。
    updateDate 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 bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.16
    published on Monday, Mar 9, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.