volcengine.kms.KeyEnable
Explore with Pulumi AI
Provides a resource to manage kms key enable
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.kms.KeyEnable("foo", {keyId: "0e5a256d-d075-44b1-bcd2-09efafxxxxxx"});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.kms.KeyEnable("foo", key_id="0e5a256d-d075-44b1-bcd2-09efafxxxxxx")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kms"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kms.NewKeyEnable(ctx, "foo", &kms.KeyEnableArgs{
KeyId: pulumi.String("0e5a256d-d075-44b1-bcd2-09efafxxxxxx"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Kms.KeyEnable("foo", new()
{
KeyId = "0e5a256d-d075-44b1-bcd2-09efafxxxxxx",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.kms.KeyEnable;
import com.pulumi.volcengine.kms.KeyEnableArgs;
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 foo = new KeyEnable("foo", KeyEnableArgs.builder()
.keyId("0e5a256d-d075-44b1-bcd2-09efafxxxxxx")
.build());
}
}
resources:
foo:
type: volcengine:kms:KeyEnable
properties:
keyId: 0e5a256d-d075-44b1-bcd2-09efafxxxxxx
Create KeyEnable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyEnable(name: string, args?: KeyEnableArgs, opts?: CustomResourceOptions);
@overload
def KeyEnable(resource_name: str,
args: Optional[KeyEnableArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def KeyEnable(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None)
func NewKeyEnable(ctx *Context, name string, args *KeyEnableArgs, opts ...ResourceOption) (*KeyEnable, error)
public KeyEnable(string name, KeyEnableArgs? args = null, CustomResourceOptions? opts = null)
public KeyEnable(String name, KeyEnableArgs args)
public KeyEnable(String name, KeyEnableArgs args, CustomResourceOptions options)
type: volcengine:kms:KeyEnable
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 KeyEnableArgs
- 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 KeyEnableArgs
- 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 KeyEnableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyEnableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyEnableArgs
- 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 keyEnableResource = new Volcengine.Kms.KeyEnable("keyEnableResource", new()
{
KeyId = "string",
KeyName = "string",
KeyringName = "string",
});
example, err := kms.NewKeyEnable(ctx, "keyEnableResource", &kms.KeyEnableArgs{
KeyId: pulumi.String("string"),
KeyName: pulumi.String("string"),
KeyringName: pulumi.String("string"),
})
var keyEnableResource = new KeyEnable("keyEnableResource", KeyEnableArgs.builder()
.keyId("string")
.keyName("string")
.keyringName("string")
.build());
key_enable_resource = volcengine.kms.KeyEnable("keyEnableResource",
key_id="string",
key_name="string",
keyring_name="string")
const keyEnableResource = new volcengine.kms.KeyEnable("keyEnableResource", {
keyId: "string",
keyName: "string",
keyringName: "string",
});
type: volcengine:kms:KeyEnable
properties:
keyId: string
keyName: string
keyringName: string
KeyEnable 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 KeyEnable resource accepts the following input properties:
- Key
Id string - The id of the CMK.
- Key
Name string - The name of the CMK.
- Keyring
Name string - The name of the keyring.
- Key
Id string - The id of the CMK.
- Key
Name string - The name of the CMK.
- Keyring
Name string - The name of the keyring.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- keyring
Name String - The name of the keyring.
- key
Id string - The id of the CMK.
- key
Name string - The name of the CMK.
- keyring
Name string - The name of the keyring.
- key_
id str - The id of the CMK.
- key_
name str - The name of the CMK.
- keyring_
name str - The name of the keyring.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- keyring
Name String - The name of the keyring.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyEnable resource produces the following output properties:
Look up Existing KeyEnable Resource
Get an existing KeyEnable 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?: KeyEnableState, opts?: CustomResourceOptions): KeyEnable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
key_state: Optional[str] = None,
keyring_name: Optional[str] = None) -> KeyEnable
func GetKeyEnable(ctx *Context, name string, id IDInput, state *KeyEnableState, opts ...ResourceOption) (*KeyEnable, error)
public static KeyEnable Get(string name, Input<string> id, KeyEnableState? state, CustomResourceOptions? opts = null)
public static KeyEnable get(String name, Output<String> id, KeyEnableState state, CustomResourceOptions options)
resources: _: type: volcengine:kms:KeyEnable 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.
- Key
Id string - The id of the CMK.
- Key
Name string - The name of the CMK.
- Key
State string - The state of the key.
- Keyring
Name string - The name of the keyring.
- Key
Id string - The id of the CMK.
- Key
Name string - The name of the CMK.
- Key
State string - The state of the key.
- Keyring
Name string - The name of the keyring.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- key
State String - The state of the key.
- keyring
Name String - The name of the keyring.
- key
Id string - The id of the CMK.
- key
Name string - The name of the CMK.
- key
State string - The state of the key.
- keyring
Name string - The name of the keyring.
- key_
id str - The id of the CMK.
- key_
name str - The name of the CMK.
- key_
state str - The state of the key.
- keyring_
name str - The name of the keyring.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- key
State String - The state of the key.
- keyring
Name String - The name of the keyring.
Import
KmsKeyEnable can be imported using the id, e.g.
$ pulumi import volcengine:kms/keyEnable:KeyEnable default resource_id
or
$ pulumi import volcengine:kms/keyEnable:KeyEnable default key_name:keyring_name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.