1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Kms
  5. getDecryptedData
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Kms.getDecryptedData

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    The oci.Kms.getDecryptedData data source provides details about a specific DecryptedData

    Decrypts data using the given DecryptDataDetails resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDecryptedData = oci.Kms.getDecryptedData({
        ciphertext: decryptedDataCiphertext,
        cryptoEndpoint: decryptedDataCryptoEndpoint,
        keyId: testKey.id,
        associatedData: decryptedDataAssociatedData,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_decrypted_data = oci.Kms.get_decrypted_data(ciphertext=decrypted_data_ciphertext,
        crypto_endpoint=decrypted_data_crypto_endpoint,
        key_id=test_key["id"],
        associated_data=decrypted_data_associated_data)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Kms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Kms.GetDecryptedData(ctx, &kms.GetDecryptedDataArgs{
    			Ciphertext:     decryptedDataCiphertext,
    			CryptoEndpoint: decryptedDataCryptoEndpoint,
    			KeyId:          testKey.Id,
    			AssociatedData: decryptedDataAssociatedData,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testDecryptedData = Oci.Kms.GetDecryptedData.Invoke(new()
        {
            Ciphertext = decryptedDataCiphertext,
            CryptoEndpoint = decryptedDataCryptoEndpoint,
            KeyId = testKey.Id,
            AssociatedData = decryptedDataAssociatedData,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Kms.KmsFunctions;
    import com.pulumi.oci.Kms.inputs.GetDecryptedDataArgs;
    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) {
            final var testDecryptedData = KmsFunctions.getDecryptedData(GetDecryptedDataArgs.builder()
                .ciphertext(decryptedDataCiphertext)
                .cryptoEndpoint(decryptedDataCryptoEndpoint)
                .keyId(testKey.id())
                .associatedData(decryptedDataAssociatedData)
                .build());
    
        }
    }
    
    variables:
      testDecryptedData:
        fn::invoke:
          Function: oci:Kms:getDecryptedData
          Arguments:
            ciphertext: ${decryptedDataCiphertext}
            cryptoEndpoint: ${decryptedDataCryptoEndpoint}
            keyId: ${testKey.id}
            associatedData: ${decryptedDataAssociatedData}
    

    Using getDecryptedData

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDecryptedData(args: GetDecryptedDataArgs, opts?: InvokeOptions): Promise<GetDecryptedDataResult>
    function getDecryptedDataOutput(args: GetDecryptedDataOutputArgs, opts?: InvokeOptions): Output<GetDecryptedDataResult>
    def get_decrypted_data(associated_data: Optional[Mapping[str, str]] = None,
                           ciphertext: Optional[str] = None,
                           crypto_endpoint: Optional[str] = None,
                           key_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetDecryptedDataResult
    def get_decrypted_data_output(associated_data: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                           ciphertext: Optional[pulumi.Input[str]] = None,
                           crypto_endpoint: Optional[pulumi.Input[str]] = None,
                           key_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetDecryptedDataResult]
    func GetDecryptedData(ctx *Context, args *GetDecryptedDataArgs, opts ...InvokeOption) (*GetDecryptedDataResult, error)
    func GetDecryptedDataOutput(ctx *Context, args *GetDecryptedDataOutputArgs, opts ...InvokeOption) GetDecryptedDataResultOutput

    > Note: This function is named GetDecryptedData in the Go SDK.

    public static class GetDecryptedData 
    {
        public static Task<GetDecryptedDataResult> InvokeAsync(GetDecryptedDataArgs args, InvokeOptions? opts = null)
        public static Output<GetDecryptedDataResult> Invoke(GetDecryptedDataInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDecryptedDataResult> getDecryptedData(GetDecryptedDataArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Kms/getDecryptedData:getDecryptedData
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ciphertext string
    The encrypted data to decrypt.
    CryptoEndpoint string
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    KeyId string
    The OCID of the key used to encrypt the ciphertext.
    AssociatedData Dictionary<string, string>
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.
    Ciphertext string
    The encrypted data to decrypt.
    CryptoEndpoint string
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    KeyId string
    The OCID of the key used to encrypt the ciphertext.
    AssociatedData map[string]string
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.
    ciphertext String
    The encrypted data to decrypt.
    cryptoEndpoint String
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    keyId String
    The OCID of the key used to encrypt the ciphertext.
    associatedData Map<String,String>
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.
    ciphertext string
    The encrypted data to decrypt.
    cryptoEndpoint string
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    keyId string
    The OCID of the key used to encrypt the ciphertext.
    associatedData {[key: string]: string}
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.
    ciphertext str
    The encrypted data to decrypt.
    crypto_endpoint str
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    key_id str
    The OCID of the key used to encrypt the ciphertext.
    associated_data Mapping[str, str]
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.
    ciphertext String
    The encrypted data to decrypt.
    cryptoEndpoint String
    The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations. see Vault Crypto endpoint.
    keyId String
    The OCID of the key used to encrypt the ciphertext.
    associatedData Map<String>
    Information that can be used to provide an encryption context for the encrypted data. The length of the string representation of the associatedData must be fewer than 4096 characters.

    getDecryptedData Result

    The following output properties are available:

    Ciphertext string
    CryptoEndpoint string
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    Plaintext string
    The decrypted data, in the form of a base64-encoded value.
    PlaintextChecksum string
    Checksum of the decrypted data.
    AssociatedData Dictionary<string, string>
    Ciphertext string
    CryptoEndpoint string
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    Plaintext string
    The decrypted data, in the form of a base64-encoded value.
    PlaintextChecksum string
    Checksum of the decrypted data.
    AssociatedData map[string]string
    ciphertext String
    cryptoEndpoint String
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    plaintext String
    The decrypted data, in the form of a base64-encoded value.
    plaintextChecksum String
    Checksum of the decrypted data.
    associatedData Map<String,String>
    ciphertext string
    cryptoEndpoint string
    id string
    The provider-assigned unique ID for this managed resource.
    keyId string
    plaintext string
    The decrypted data, in the form of a base64-encoded value.
    plaintextChecksum string
    Checksum of the decrypted data.
    associatedData {[key: string]: string}
    ciphertext str
    crypto_endpoint str
    id str
    The provider-assigned unique ID for this managed resource.
    key_id str
    plaintext str
    The decrypted data, in the form of a base64-encoded value.
    plaintext_checksum str
    Checksum of the decrypted data.
    associated_data Mapping[str, str]
    ciphertext String
    cryptoEndpoint String
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    plaintext String
    The decrypted data, in the form of a base64-encoded value.
    plaintextChecksum String
    Checksum of the decrypted data.
    associatedData Map<String>

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi