Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Secrets.getSecretbundle
Explore with Pulumi AI
This data source provides details about a specific Secretbundle resource in Oracle Cloud Infrastructure Secrets service.
Gets a secret bundle that matches either the specified stage
, label
, or versionNumber
parameter.
If none of these parameters are provided, the bundle for the secret version marked as CURRENT
will be returned.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecretbundle = oci.Secrets.getSecretbundle({
secretId: testSecret.id,
secretVersionName: testSecretVersion.name,
stage: secretbundleStage,
versionNumber: secretbundleVersionNumber,
});
import pulumi
import pulumi_oci as oci
test_secretbundle = oci.Secrets.get_secretbundle(secret_id=test_secret["id"],
secret_version_name=test_secret_version["name"],
stage=secretbundle_stage,
version_number=secretbundle_version_number)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Secrets"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Secrets.GetSecretbundle(ctx, &secrets.GetSecretbundleArgs{
SecretId: testSecret.Id,
SecretVersionName: pulumi.StringRef(testSecretVersion.Name),
Stage: pulumi.StringRef(secretbundleStage),
VersionNumber: pulumi.StringRef(secretbundleVersionNumber),
}, 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 testSecretbundle = Oci.Secrets.GetSecretbundle.Invoke(new()
{
SecretId = testSecret.Id,
SecretVersionName = testSecretVersion.Name,
Stage = secretbundleStage,
VersionNumber = secretbundleVersionNumber,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Secrets.SecretsFunctions;
import com.pulumi.oci.Secrets.inputs.GetSecretbundleArgs;
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 testSecretbundle = SecretsFunctions.getSecretbundle(GetSecretbundleArgs.builder()
.secretId(testSecret.id())
.secretVersionName(testSecretVersion.name())
.stage(secretbundleStage)
.versionNumber(secretbundleVersionNumber)
.build());
}
}
variables:
testSecretbundle:
fn::invoke:
Function: oci:Secrets:getSecretbundle
Arguments:
secretId: ${testSecret.id}
secretVersionName: ${testSecretVersion.name}
stage: ${secretbundleStage}
versionNumber: ${secretbundleVersionNumber}
Using getSecretbundle
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 getSecretbundle(args: GetSecretbundleArgs, opts?: InvokeOptions): Promise<GetSecretbundleResult>
function getSecretbundleOutput(args: GetSecretbundleOutputArgs, opts?: InvokeOptions): Output<GetSecretbundleResult>
def get_secretbundle(secret_id: Optional[str] = None,
secret_version_name: Optional[str] = None,
stage: Optional[str] = None,
version_number: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretbundleResult
def get_secretbundle_output(secret_id: Optional[pulumi.Input[str]] = None,
secret_version_name: Optional[pulumi.Input[str]] = None,
stage: Optional[pulumi.Input[str]] = None,
version_number: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecretbundleResult]
func GetSecretbundle(ctx *Context, args *GetSecretbundleArgs, opts ...InvokeOption) (*GetSecretbundleResult, error)
func GetSecretbundleOutput(ctx *Context, args *GetSecretbundleOutputArgs, opts ...InvokeOption) GetSecretbundleResultOutput
> Note: This function is named GetSecretbundle
in the Go SDK.
public static class GetSecretbundle
{
public static Task<GetSecretbundleResult> InvokeAsync(GetSecretbundleArgs args, InvokeOptions? opts = null)
public static Output<GetSecretbundleResult> Invoke(GetSecretbundleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecretbundleResult> getSecretbundle(GetSecretbundleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Secrets/getSecretbundle:getSecretbundle
arguments:
# arguments dictionary
The following arguments are supported:
- Secret
Id string - The OCID of the secret.
- Secret
Version stringName - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- Stage string
- The rotation state of the secret version.
- Version
Number string - The version number of the secret.
- Secret
Id string - The OCID of the secret.
- Secret
Version stringName - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- Stage string
- The rotation state of the secret version.
- Version
Number string - The version number of the secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringName - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- stage String
- The rotation state of the secret version.
- version
Number String - The version number of the secret.
- secret
Id string - The OCID of the secret.
- secret
Version stringName - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- stage string
- The rotation state of the secret version.
- version
Number string - The version number of the secret.
- secret_
id str - The OCID of the secret.
- secret_
version_ strname - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- stage str
- The rotation state of the secret version.
- version_
number str - The version number of the secret.
- secret
Id String - The OCID of the secret.
- secret
Version StringName - The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.)
- stage String
- The rotation state of the secret version.
- version
Number String - The version number of the secret.
getSecretbundle Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- Customer-provided contextual metadata for the secret.
- Secret
Bundle List<GetContents Secretbundle Secret Bundle Content> - The contents of the secret.
- Secret
Id string - The OCID of the secret.
- Stages List<string>
- A list of possible rotation states for the secret version.
- Time
Created string - The time when the secret bundle was created.
- 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
- Time
Of stringExpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Version
Name string - The name of the secret version. Labels are unique across the different versions of a particular secret.
- Version
Number string - The version number of the secret.
- Secret
Version stringName - Stage string
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- Customer-provided contextual metadata for the secret.
- Secret
Bundle []GetContents Secretbundle Secret Bundle Content - The contents of the secret.
- Secret
Id string - The OCID of the secret.
- Stages []string
- A list of possible rotation states for the secret version.
- Time
Created string - The time when the secret bundle was created.
- 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
- Time
Of stringExpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- Version
Name string - The name of the secret version. Labels are unique across the different versions of a particular secret.
- Version
Number string - The version number of the secret.
- Secret
Version stringName - Stage string
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- Customer-provided contextual metadata for the secret.
- secret
Bundle List<GetContents Secretbundle Secret Bundle Content> - The contents of the secret.
- secret
Id String - The OCID of the secret.
- stages List<String>
- A list of possible rotation states for the secret version.
- time
Created String - The time when the secret bundle was created.
- 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
- time
Of StringExpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Name String - The name of the secret version. Labels are unique across the different versions of a particular secret.
- version
Number String - The version number of the secret.
- secret
Version StringName - stage String
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- Customer-provided contextual metadata for the secret.
- secret
Bundle GetContents Secretbundle Secret Bundle Content[] - The contents of the secret.
- secret
Id string - The OCID of the secret.
- stages string[]
- A list of possible rotation states for the secret version.
- time
Created string - The time when the secret bundle was created.
- 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
- time
Of stringExpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Name string - The name of the secret version. Labels are unique across the different versions of a particular secret.
- version
Number string - The version number of the secret.
- secret
Version stringName - stage string
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- Customer-provided contextual metadata for the secret.
- secret_
bundle_ Sequence[secrets.contents Get Secretbundle Secret Bundle Content] - The contents of the secret.
- secret_
id str - The OCID of the secret.
- stages Sequence[str]
- A list of possible rotation states for the secret version.
- time_
created str - The time when the secret bundle was created.
- 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
- time_
of_ strexpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version_
name str - The name of the secret version. Labels are unique across the different versions of a particular secret.
- version_
number str - The version number of the secret.
- secret_
version_ strname - stage str
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- Customer-provided contextual metadata for the secret.
- secret
Bundle List<Property Map>Contents - The contents of the secret.
- secret
Id String - The OCID of the secret.
- stages List<String>
- A list of possible rotation states for the secret version.
- time
Created String - The time when the secret bundle was created.
- 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
- time
Of StringExpiry - An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example:
2019-04-03T21:10:29.600Z
- version
Name String - The name of the secret version. Labels are unique across the different versions of a particular secret.
- version
Number String - The version number of the secret.
- secret
Version StringName - stage String
Supporting Types
GetSecretbundleSecretBundleContent
- Content string
- The base64-encoded content of the secret.
- Content
Type string - The formatting type of the secret contents.
- Content string
- The base64-encoded content of the secret.
- Content
Type string - The formatting type of the secret contents.
- content String
- The base64-encoded content of the secret.
- content
Type String - The formatting type of the secret contents.
- content string
- The base64-encoded content of the secret.
- content
Type string - The formatting type of the secret contents.
- content str
- The base64-encoded content of the secret.
- content_
type str - The formatting type of the secret contents.
- content String
- The base64-encoded content of the secret.
- content
Type String - The formatting type of the secret contents.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.