Class Ciphertext


  • public class Ciphertext
    extends com.pulumi.resources.CustomResource
    The 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 Usage
     
     package 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());
     
         }
     }
     
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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 Ciphertext get​(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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.