Provides a resource to manage kms ciphertext
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const encryptStable = new volcengine.kms.Ciphertext("encryptStable", {
keyId: "c44870c3-f33b-421a-****-a2bba37c993e",
plaintext: "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
});
import pulumi
import pulumi_volcengine as volcengine
encrypt_stable = volcengine.kms.Ciphertext("encryptStable",
key_id="c44870c3-f33b-421a-****-a2bba37c993e",
plaintext="VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
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.NewCiphertext(ctx, "encryptStable", &kms.CiphertextArgs{
KeyId: pulumi.String("c44870c3-f33b-421a-****-a2bba37c993e"),
Plaintext: pulumi.String("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg=="),
})
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 encryptStable = new Volcengine.Kms.Ciphertext("encryptStable", new()
{
KeyId = "c44870c3-f33b-421a-****-a2bba37c993e",
Plaintext = "VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.kms.Ciphertext;
import com.pulumi.volcengine.kms.CiphertextArgs;
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 encryptStable = new Ciphertext("encryptStable", CiphertextArgs.builder()
.keyId("c44870c3-f33b-421a-****-a2bba37c993e")
.plaintext("VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==")
.build());
}
}
resources:
encryptStable:
type: volcengine:kms:Ciphertext
properties:
keyId: c44870c3-f33b-421a-****-a2bba37c993e
plaintext: VGhpcyBpcyBhIHBsYWludGV4dCBleGFtcGxlLg==
Create Ciphertext Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Ciphertext(name: string, args: CiphertextArgs, opts?: CustomResourceOptions);@overload
def Ciphertext(resource_name: str,
args: CiphertextArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Ciphertext(resource_name: str,
opts: Optional[ResourceOptions] = None,
plaintext: Optional[str] = None,
encryption_context: Optional[str] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None)func NewCiphertext(ctx *Context, name string, args CiphertextArgs, opts ...ResourceOption) (*Ciphertext, error)public Ciphertext(string name, CiphertextArgs args, CustomResourceOptions? opts = null)
public Ciphertext(String name, CiphertextArgs args)
public Ciphertext(String name, CiphertextArgs args, CustomResourceOptions options)
type: volcengine:kms:Ciphertext
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 CiphertextArgs
- 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 CiphertextArgs
- 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 CiphertextArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CiphertextArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CiphertextArgs
- 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 ciphertextResource = new Volcengine.Kms.Ciphertext("ciphertextResource", new()
{
Plaintext = "string",
EncryptionContext = "string",
KeyId = "string",
KeyName = "string",
KeyringName = "string",
});
example, err := kms.NewCiphertext(ctx, "ciphertextResource", &kms.CiphertextArgs{
Plaintext: pulumi.String("string"),
EncryptionContext: pulumi.String("string"),
KeyId: pulumi.String("string"),
KeyName: pulumi.String("string"),
KeyringName: pulumi.String("string"),
})
var ciphertextResource = new Ciphertext("ciphertextResource", CiphertextArgs.builder()
.plaintext("string")
.encryptionContext("string")
.keyId("string")
.keyName("string")
.keyringName("string")
.build());
ciphertext_resource = volcengine.kms.Ciphertext("ciphertextResource",
plaintext="string",
encryption_context="string",
key_id="string",
key_name="string",
keyring_name="string")
const ciphertextResource = new volcengine.kms.Ciphertext("ciphertextResource", {
plaintext: "string",
encryptionContext: "string",
keyId: "string",
keyName: "string",
keyringName: "string",
});
type: volcengine:kms:Ciphertext
properties:
encryptionContext: string
keyId: string
keyName: string
keyringName: string
plaintext: string
Ciphertext 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 Ciphertext resource accepts the following input properties:
- Plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key.
- Keyring
Name string - The name of the keyring.
- Plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key.
- Keyring
Name string - The name of the keyring.
- plaintext String
- The plaintext to be symmetrically encrypted, Base64 encoded.
- encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key.
- keyring
Name String - The name of the keyring.
- plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- encryption
Context string - The JSON string of key/value pairs.
- key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of the key.
- keyring
Name string - The name of the keyring.
- plaintext str
- The plaintext to be symmetrically encrypted, Base64 encoded.
- encryption_
context str - The JSON string of key/value pairs.
- key_
id str - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key_
name str - The name of the key.
- keyring_
name str - The name of the keyring.
- plaintext String
- The plaintext to be symmetrically encrypted, Base64 encoded.
- encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key.
- keyring
Name String - The name of the keyring.
Outputs
All input properties are implicitly available as output properties. Additionally, the Ciphertext resource produces the following output properties:
- Ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - Id string
- The provider-assigned unique ID for this managed resource.
- Ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - Id string
- The provider-assigned unique ID for this managed resource.
- ciphertext
Blob String - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - id String
- The provider-assigned unique ID for this managed resource.
- ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - id string
- The provider-assigned unique ID for this managed resource.
- ciphertext_
blob str - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - id str
- The provider-assigned unique ID for this managed resource.
- ciphertext
Blob String - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Ciphertext Resource
Get an existing Ciphertext 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?: CiphertextState, opts?: CustomResourceOptions): Ciphertext@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ciphertext_blob: Optional[str] = None,
encryption_context: Optional[str] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
keyring_name: Optional[str] = None,
plaintext: Optional[str] = None) -> Ciphertextfunc GetCiphertext(ctx *Context, name string, id IDInput, state *CiphertextState, opts ...ResourceOption) (*Ciphertext, error)public static Ciphertext Get(string name, Input<string> id, CiphertextState? state, CustomResourceOptions? opts = null)public static Ciphertext get(String name, Output<String> id, CiphertextState state, CustomResourceOptions options)resources: _: type: volcengine:kms:Ciphertext 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.
- Ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key.
- Keyring
Name string - The name of the keyring.
- Plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- Ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - Encryption
Context string - The JSON string of key/value pairs.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key.
- Keyring
Name string - The name of the keyring.
- Plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- ciphertext
Blob String - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key.
- keyring
Name String - The name of the keyring.
- plaintext String
- The plaintext to be symmetrically encrypted, Base64 encoded.
- ciphertext
Blob string - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - encryption
Context string - The JSON string of key/value pairs.
- key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of the key.
- keyring
Name string - The name of the keyring.
- plaintext string
- The plaintext to be symmetrically encrypted, Base64 encoded.
- ciphertext_
blob str - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - encryption_
context str - The JSON string of key/value pairs.
- key_
id str - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key_
name str - The name of the key.
- keyring_
name str - The name of the keyring.
- plaintext str
- The plaintext to be symmetrically encrypted, Base64 encoded.
- ciphertext
Blob String - The ciphertext, Base64 encoded. The produced ciphertext_blob stays stable across applies. If the plaintext should be re-encrypted on each apply use the
volcengine.kms.getCiphertextsdata source. - encryption
Context String - The JSON string of key/value pairs.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key.
- keyring
Name String - The name of the keyring.
- plaintext String
- The plaintext to be symmetrically encrypted, Base64 encoded.
Import
The KmsCiphertext is not support import.
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
volcengineTerraform Provider.
