GetSecretVersions
This data source provides a list of KMS Secret Versions in an Alibaba Cloud account according to the specified filters.
NOTE: Available in v1.88.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var kmsSecretVersionsDs = Output.Create(AliCloud.Kms.GetSecretVersions.InvokeAsync(new AliCloud.Kms.GetSecretVersionsArgs
{
EnableDetails = true,
SecretName = "secret_name",
}));
this.FirstSecretData = kmsSecretVersionsDs.Apply(kmsSecretVersionsDs => kmsSecretVersionsDs.Versions[0].SecretData);
}
[Output("firstSecretData")]
public Output<string> FirstSecretData { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
kms_secret_versions_ds = alicloud.kms.get_secret_versions(enable_details=True,
secret_name="secret_name")
pulumi.export("firstSecretData", kms_secret_versions_ds.versions[0]["secret_data"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const kmsSecretVersionsDs = pulumi.output(alicloud.kms.getSecretVersions({
enableDetails: true,
secretName: "secret_name",
}, { async: true }));
export const firstSecretData = kmsSecretVersionsDs.versions[0].secretData;Using GetSecretVersions
function getSecretVersions(args: GetSecretVersionsArgs, opts?: InvokeOptions): Promise<GetSecretVersionsResult>function get_secret_versions(enable_details=None, ids=None, include_deprecated=None, output_file=None, secret_name=None, version_stage=None, opts=None)func GetSecretVersions(ctx *Context, args *GetSecretVersionsArgs, opts ...InvokeOption) (*GetSecretVersionsResult, error)public static class GetSecretVersions {
public static Task<GetSecretVersionsResult> InvokeAsync(GetSecretVersionsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Secret
Name string The name of the secret.
- Enable
Details bool Default to false and only output
secret_name,version_id,version_stages. Set it to true can output more details.- Ids List<string>
A list of KMS Secret Version ids.
- Include
Deprecated string Specifies whether to return deprecated secret versions. Default to
false.- Output
File string - Version
Stage string The stage of the secret version.
- Secret
Name string The name of the secret.
- Enable
Details bool Default to false and only output
secret_name,version_id,version_stages. Set it to true can output more details.- Ids []string
A list of KMS Secret Version ids.
- Include
Deprecated string Specifies whether to return deprecated secret versions. Default to
false.- Output
File string - Version
Stage string The stage of the secret version.
- secret
Name string The name of the secret.
- enable
Details boolean Default to false and only output
secret_name,version_id,version_stages. Set it to true can output more details.- ids string[]
A list of KMS Secret Version ids.
- include
Deprecated string Specifies whether to return deprecated secret versions. Default to
false.- output
File string - version
Stage string The stage of the secret version.
- secret_
name str The name of the secret.
- enable_
details bool Default to false and only output
secret_name,version_id,version_stages. Set it to true can output more details.- ids List[str]
A list of KMS Secret Version ids.
- include_
deprecated str Specifies whether to return deprecated secret versions. Default to
false.- output_
file str - version_
stage str The stage of the secret version.
GetSecretVersions Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of Kms Secret Version ids.
- Secret
Name string The name of the secret.
- Versions
List<Pulumi.
Ali Cloud. Kms. Outputs. Get Secret Versions Version> A list of KMS Secret Versions. Each element contains the following attributes:
- Enable
Details bool - Include
Deprecated string - Output
File string - Version
Stage string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of Kms Secret Version ids.
- Secret
Name string The name of the secret.
- Versions
[]Get
Secret Versions Version A list of KMS Secret Versions. Each element contains the following attributes:
- Enable
Details bool - Include
Deprecated string - Output
File string - Version
Stage string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of Kms Secret Version ids.
- secret
Name string The name of the secret.
- versions
Get
Secret Versions Version[] A list of KMS Secret Versions. Each element contains the following attributes:
- enable
Details boolean - include
Deprecated string - output
File string - version
Stage string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of Kms Secret Version ids.
- secret_
name str The name of the secret.
- versions
List[Get
Secret Versions Version] A list of KMS Secret Versions. Each element contains the following attributes:
- enable_
details bool - include_
deprecated str - output_
file str - version_
stage str
Supporting Types
GetSecretVersionsVersion
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Secret
Data string The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when
enable_detailsis true).- Secret
Data stringType The type of the secret value. (Returned when
enable_detailsis true).- Secret
Name string The name of the secret.
- Version
Id string The version number of the secret value.
- Version
Stages List<string> Stage labels that mark the secret version.
- Secret
Data string The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when
enable_detailsis true).- Secret
Data stringType The type of the secret value. (Returned when
enable_detailsis true).- Secret
Name string The name of the secret.
- Version
Id string The version number of the secret value.
- Version
Stages []string Stage labels that mark the secret version.
- secret
Data string The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when
enable_detailsis true).- secret
Data stringType The type of the secret value. (Returned when
enable_detailsis true).- secret
Name string The name of the secret.
- version
Id string The version number of the secret value.
- version
Stages string[] Stage labels that mark the secret version.
- secret_
data str The secret value. Secrets Manager decrypts the stored secret value in ciphertext and returns it. (Returned when
enable_detailsis true).- secret_
data_ strtype The type of the secret value. (Returned when
enable_detailsis true).- secret_
name str The name of the secret.
- version_
id str The version number of the secret value.
- version_
stages List[str] Stage labels that mark the secret version.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.