Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getDecryptedData

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

Decrypts data using the given DecryptDataDetails resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testDecryptedData = Oci.Kms.GetDecryptedData.Invoke(new()
    {
        Ciphertext = @var.Decrypted_data_ciphertext,
        CryptoEndpoint = @var.Decrypted_data_crypto_endpoint,
        KeyId = oci_kms_key.Test_key.Id,
        AssociatedData = @var.Decrypted_data_associated_data,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:     _var.Decrypted_data_ciphertext,
			CryptoEndpoint: _var.Decrypted_data_crypto_endpoint,
			KeyId:          oci_kms_key.Test_key.Id,
			AssociatedData: _var.Decrypted_data_associated_data,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.decrypted_data_ciphertext())
            .cryptoEndpoint(var_.decrypted_data_crypto_endpoint())
            .keyId(oci_kms_key.test_key().id())
            .associatedData(var_.decrypted_data_associated_data())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_decrypted_data = oci.Kms.get_decrypted_data(ciphertext=var["decrypted_data_ciphertext"],
    crypto_endpoint=var["decrypted_data_crypto_endpoint"],
    key_id=oci_kms_key["test_key"]["id"],
    associated_data=var["decrypted_data_associated_data"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDecryptedData = oci.Kms.getDecryptedData({
    ciphertext: _var.decrypted_data_ciphertext,
    cryptoEndpoint: _var.decrypted_data_crypto_endpoint,
    keyId: oci_kms_key.test_key.id,
    associatedData: _var.decrypted_data_associated_data,
});
variables:
  testDecryptedData:
    Fn::Invoke:
      Function: oci:Kms:getDecryptedData
      Arguments:
        ciphertext: ${var.decrypted_data_ciphertext}
        cryptoEndpoint: ${var.decrypted_data_crypto_endpoint}
        keyId: ${oci_kms_key.test_key.id}
        associatedData: ${var.decrypted_data_associated_data}

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, Any]] = 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, Any]]] = 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, object>

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]interface{}

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,Object>

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]: any}

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, Any]

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<Any>

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, object>
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]interface{}
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,Object>
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]: any}
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, Any]
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<Any>

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.