Package com.pulumi.aws.kms
Class Ciphertext
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.kms.Ciphertext
-
public class Ciphertext extends com.pulumi.resources.CustomResourceThe KMS ciphertext resource allows you to encrypt plaintext into ciphertext by using an AWS KMS customer master key. The value returned by this resource is stable across every apply. For a changing ciphertext value each apply, see the `aws.kms.Ciphertext` data source. ## Example Usagepackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.kms.Key; import com.pulumi.aws.kms.KeyArgs; import com.pulumi.aws.kms.Ciphertext; import com.pulumi.aws.kms.CiphertextArgs; import java.util.ArrayList; import java.util.Arrays; 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 oauthConfig = new Key("oauthConfig", KeyArgs.builder() .description("oauth config") .isEnabled(true) .build()); var oauth = new Ciphertext("oauth", CiphertextArgs.builder() .keyId(oauthConfig.keyId()) .plaintext(""" { \"client_id\": \"e587dbae22222f55da22\", \"client_secret\": \"8289575d00000ace55e1815ec13673955721b8a5\" } """) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Ciphertext(java.lang.String name)Ciphertext(java.lang.String name, CiphertextArgs args)Ciphertext(java.lang.String name, CiphertextArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>ciphertextBlob()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>context()static Ciphertextget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CiphertextState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>keyId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>plaintext()com.pulumi.core.Output<java.util.Optional<java.lang.String>>plaintextWo()com.pulumi.core.Output<java.util.Optional<java.lang.String>>plaintextWoVersion()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
Ciphertext
public Ciphertext(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Ciphertext
public Ciphertext(java.lang.String name, CiphertextArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Ciphertext
public Ciphertext(java.lang.String name, CiphertextArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
ciphertextBlob
public com.pulumi.core.Output<java.lang.String> ciphertextBlob()
- Returns:
- Base64 encoded ciphertext
-
context
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> context()
- Returns:
- Mapping that makes up the encryption context.
-
keyId
public com.pulumi.core.Output<java.lang.String> keyId()
- Returns:
- Globally unique key ID for the customer master key.
-
plaintext
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> plaintext()
- Returns:
- Data to be encrypted. Note that this may show up in logs, and it will be stored in the state file.
-
plaintextWo
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> plaintextWo()
- Returns:
- **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Data to be encrypted. Note that this may show up in logs. It will not be stored in the state file.
-
plaintextWoVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> plaintextWoVersion()
- Returns:
- Triggers a replacement together with `plaintextWo`. Modify this value when a replacement is required.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static Ciphertext get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable CiphertextState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-