volcengine.kms.KeyRotation
Explore with Pulumi AI
Provides a resource to manage kms key rotation
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.kms.KeyRotation("foo", {keyId: "m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx"});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.kms.KeyRotation("foo", key_id="m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx")
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.NewKeyRotation(ctx, "foo", &kms.KeyRotationArgs{
KeyId: pulumi.String("m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx"),
})
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.KeyRotation("foo", new()
{
KeyId = "m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.kms.KeyRotation;
import com.pulumi.volcengine.kms.KeyRotationArgs;
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 KeyRotation("foo", KeyRotationArgs.builder()
.keyId("m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx")
.build());
}
}
resources:
foo:
type: volcengine:kms:KeyRotation
properties:
keyId: m_cn-guilin-boe_63c08fe9-42e8-4c10-a09e-8e8e6xxxxxx
Create KeyRotation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyRotation(name: string, args?: KeyRotationArgs, opts?: CustomResourceOptions);
@overload
def KeyRotation(resource_name: str,
args: Optional[KeyRotationArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def KeyRotation(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None)
func NewKeyRotation(ctx *Context, name string, args *KeyRotationArgs, opts ...ResourceOption) (*KeyRotation, error)
public KeyRotation(string name, KeyRotationArgs? args = null, CustomResourceOptions? opts = null)
public KeyRotation(String name, KeyRotationArgs args)
public KeyRotation(String name, KeyRotationArgs args, CustomResourceOptions options)
type: volcengine:kms:KeyRotation
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 KeyRotationArgs
- 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 KeyRotationArgs
- 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 KeyRotationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyRotationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyRotationArgs
- 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 keyRotationResource = new Volcengine.Kms.KeyRotation("keyRotationResource", new()
{
KeyId = "string",
KeyName = "string",
KeyringName = "string",
});
example, err := kms.NewKeyRotation(ctx, "keyRotationResource", &kms.KeyRotationArgs{
KeyId: pulumi.String("string"),
KeyName: pulumi.String("string"),
KeyringName: pulumi.String("string"),
})
var keyRotationResource = new KeyRotation("keyRotationResource", KeyRotationArgs.builder()
.keyId("string")
.keyName("string")
.keyringName("string")
.build());
key_rotation_resource = volcengine.kms.KeyRotation("keyRotationResource",
key_id="string",
key_name="string",
keyring_name="string")
const keyRotationResource = new volcengine.kms.KeyRotation("keyRotationResource", {
keyId: "string",
keyName: "string",
keyringName: "string",
});
type: volcengine:kms:KeyRotation
properties:
keyId: string
keyName: string
keyringName: string
KeyRotation 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 KeyRotation 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 KeyRotation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Rotation
State string - The state of the key rotation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rotation
State string - The state of the key rotation.
- id String
- The provider-assigned unique ID for this managed resource.
- rotation
State String - The state of the key rotation.
- id string
- The provider-assigned unique ID for this managed resource.
- rotation
State string - The state of the key rotation.
- id str
- The provider-assigned unique ID for this managed resource.
- rotation_
state str - The state of the key rotation.
- id String
- The provider-assigned unique ID for this managed resource.
- rotation
State String - The state of the key rotation.
Look up Existing KeyRotation Resource
Get an existing KeyRotation 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?: KeyRotationState, opts?: CustomResourceOptions): KeyRotation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None,
rotation_state: Optional[str] = None) -> KeyRotation
func GetKeyRotation(ctx *Context, name string, id IDInput, state *KeyRotationState, opts ...ResourceOption) (*KeyRotation, error)
public static KeyRotation Get(string name, Input<string> id, KeyRotationState? state, CustomResourceOptions? opts = null)
public static KeyRotation get(String name, Output<String> id, KeyRotationState state, CustomResourceOptions options)
resources: _: type: volcengine:kms:KeyRotation 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.
- Keyring
Name string - The name of the keyring.
- Rotation
State string - The state of the key rotation.
- Key
Id string - The id of the CMK.
- Key
Name string - The name of the CMK.
- Keyring
Name string - The name of the keyring.
- Rotation
State string - The state of the key rotation.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- keyring
Name String - The name of the keyring.
- rotation
State String - The state of the key rotation.
- key
Id string - The id of the CMK.
- key
Name string - The name of the CMK.
- keyring
Name string - The name of the keyring.
- rotation
State string - The state of the key rotation.
- key_
id str - The id of the CMK.
- key_
name str - The name of the CMK.
- keyring_
name str - The name of the keyring.
- rotation_
state str - The state of the key rotation.
- key
Id String - The id of the CMK.
- key
Name String - The name of the CMK.
- keyring
Name String - The name of the keyring.
- rotation
State String - The state of the key rotation.
Import
KmsKeyRotation can be imported using the id, e.g.
$ pulumi import volcengine:kms/keyRotation:KeyRotation default resource_id
or
$ pulumi import volcengine:kms/keyRotation:KeyRotation 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.