Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Vault.getSecretVersion
Explore with Pulumi AI
This data source provides details about a specific Secret Version resource in Oracle Cloud Infrastructure Vault service.
Gets information about the specified version of a secret.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecretVersion = oci.Vault.getSecretVersion({
secretId: testSecret.id,
secretVersionNumber: secretVersionSecretVersionNumber,
});
import pulumi
import pulumi_oci as oci
test_secret_version = oci.Vault.get_secret_version(secret_id=test_secret["id"],
secret_version_number=secret_version_secret_version_number)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Vault.GetSecretVersion(ctx, &vault.GetSecretVersionArgs{
SecretId: testSecret.Id,
SecretVersionNumber: secretVersionSecretVersionNumber,
}, 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 testSecretVersion = Oci.Vault.GetSecretVersion.Invoke(new()
{
SecretId = testSecret.Id,
SecretVersionNumber = secretVersionSecretVersionNumber,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Vault.VaultFunctions;
import com.pulumi.oci.Vault.inputs.GetSecretVersionArgs;
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 testSecretVersion = VaultFunctions.getSecretVersion(GetSecretVersionArgs.builder()
.secretId(testSecret.id())
.secretVersionNumber(secretVersionSecretVersionNumber)
.build());
}
}
variables:
testSecretVersion:
fn::invoke:
Function: oci:Vault:getSecretVersion
Arguments:
secretId: ${testSecret.id}
secretVersionNumber: ${secretVersionSecretVersionNumber}
Using getSecretVersion
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 getSecretVersion(args: GetSecretVersionArgs, opts?: InvokeOptions): Promise<GetSecretVersionResult>
function getSecretVersionOutput(args: GetSecretVersionOutputArgs, opts?: InvokeOptions): Output<GetSecretVersionResult>
def get_secret_version(secret_id: Optional[str] = None,
secret_version_number: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretVersionResult
def get_secret_version_output(secret_id: Optional[pulumi.Input[str]] = None,
secret_version_number: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecretVersionResult]
func GetSecretVersion(ctx *Context, args *GetSecretVersionArgs, opts ...InvokeOption) (*GetSecretVersionResult, error)
func GetSecretVersionOutput(ctx *Context, args *GetSecretVersionOutputArgs, opts ...InvokeOption) GetSecretVersionResultOutput
> Note: This function is named GetSecretVersion
in the Go SDK.
public static class GetSecretVersion
{
public static Task<GetSecretVersionResult> InvokeAsync(GetSecretVersionArgs args, InvokeOptions? opts = null)
public static Output<GetSecretVersionResult> Invoke(GetSecretVersionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecretVersionResult> getSecretVersion(GetSecretVersionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Vault/getSecretVersion:getSecretVersion
arguments:
# arguments dictionary
The following arguments are supported:
- Secret
Id string - The OCID of the secret.
- Secret
Version stringNumber - The version number of the secret.
- Secret
Id string - The OCID of the secret.
- Secret
Version stringNumber - The version number of the secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringNumber - The version number of the secret.
- secret
Id string - The OCID of the secret.
- secret
Version stringNumber - The version number of the secret.
- secret_
id str - The OCID of the secret.
- secret_
version_ strnumber - The version number of the secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringNumber - The version number of the secret.
getSecretVersion Result
The following output properties are available:
- Content
Type string - The content type of the secret version's secret contents.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the secret version. A name is unique across versions of a secret.
- Secret
Id string - The OCID of the secret.
- Secret
Version stringNumber - Stages List<string>
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - Time
Created string - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Time
Of stringCurrent Version Expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Time
Of stringDeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Version
Number string - The version number of the secret.
- Content
Type string - The content type of the secret version's secret contents.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the secret version. A name is unique across versions of a secret.
- Secret
Id string - The OCID of the secret.
- Secret
Version stringNumber - Stages []string
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - Time
Created string - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Time
Of stringCurrent Version Expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Time
Of stringDeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Version
Number string - The version number of the secret.
- content
Type String - The content type of the secret version's secret contents.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the secret version. A name is unique across versions of a secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringNumber - stages List<String>
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - time
Created String - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of StringCurrent Version Expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of StringDeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Number String - The version number of the secret.
- content
Type string - The content type of the secret version's secret contents.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the secret version. A name is unique across versions of a secret.
- secret
Id string - The OCID of the secret.
- secret
Version stringNumber - stages string[]
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - time
Created string - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of stringCurrent Version Expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of stringDeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Number string - The version number of the secret.
- content_
type str - The content type of the secret version's secret contents.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the secret version. A name is unique across versions of a secret.
- secret_
id str - The OCID of the secret.
- secret_
version_ strnumber - stages Sequence[str]
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - time_
created str - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time_
of_ strcurrent_ version_ expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time_
of_ strdeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version_
number str - The version number of the secret.
- content
Type String - The content type of the secret version's secret contents.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the secret version. A name is unique across versions of a secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringNumber - stages List<String>
- A list of possible rotation states for the secret version. A secret version marked
CURRENT
is currently in use. A secret version markedPENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always markedLATEST
. (The first version of a secret is always marked as bothCURRENT
andLATEST
.) A secret version markedPREVIOUS
is the secret version that was most recently markedCURRENT
, before the last secret version rotation. A secret version markedDEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions markedDEPRECATED
can be scheduled for deletion. - time
Created String - A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of StringCurrent Version Expiry - An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- time
Of StringDeletion - An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Number String - The version number of the secret.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.