1. Packages
  2. AWS
  3. API Docs
  4. secretsmanager
  5. getSecretVersions
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.secretsmanager.getSecretVersions

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

Using getSecretVersions

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 getSecretVersions(args: GetSecretVersionsArgs, opts?: InvokeOptions): Promise<GetSecretVersionsResult>
function getSecretVersionsOutput(args: GetSecretVersionsOutputArgs, opts?: InvokeOptions): Output<GetSecretVersionsResult>
Copy
def get_secret_versions(include_deprecated: Optional[bool] = None,
                        secret_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetSecretVersionsResult
def get_secret_versions_output(include_deprecated: Optional[pulumi.Input[bool]] = None,
                        secret_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetSecretVersionsResult]
Copy
func GetSecretVersions(ctx *Context, args *GetSecretVersionsArgs, opts ...InvokeOption) (*GetSecretVersionsResult, error)
func GetSecretVersionsOutput(ctx *Context, args *GetSecretVersionsOutputArgs, opts ...InvokeOption) GetSecretVersionsResultOutput
Copy

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

public static class GetSecretVersions 
{
    public static Task<GetSecretVersionsResult> InvokeAsync(GetSecretVersionsArgs args, InvokeOptions? opts = null)
    public static Output<GetSecretVersionsResult> Invoke(GetSecretVersionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSecretVersionsResult> getSecretVersions(GetSecretVersionsArgs args, InvokeOptions options)
public static Output<GetSecretVersionsResult> getSecretVersions(GetSecretVersionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:secretsmanager/getSecretVersions:getSecretVersions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SecretId This property is required. string
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
IncludeDeprecated bool
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.
SecretId This property is required. string
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
IncludeDeprecated bool
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.
secretId This property is required. String
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
includeDeprecated Boolean
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.
secretId This property is required. string
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
includeDeprecated boolean
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.
secret_id This property is required. str
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
include_deprecated bool
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.
secretId This property is required. String
Specifies the secret containing the version that you want to retrieve. You can specify either the ARN or the friendly name of the secret.
includeDeprecated Boolean
If true, all deprecated secret versions are included in the response. If false, no deprecated secret versions are included in the response. If no value is specified, the default value is false.

getSecretVersions Result

The following output properties are available:

Arn string
ARN of the secret.
Id string
The provider-assigned unique ID for this managed resource.
Name string
SecretId string
Versions List<GetSecretVersionsVersion>
List of the versions of the secret. Attributes are specified below.
IncludeDeprecated bool
Arn string
ARN of the secret.
Id string
The provider-assigned unique ID for this managed resource.
Name string
SecretId string
Versions []GetSecretVersionsVersion
List of the versions of the secret. Attributes are specified below.
IncludeDeprecated bool
arn String
ARN of the secret.
id String
The provider-assigned unique ID for this managed resource.
name String
secretId String
versions List<GetSecretVersionsVersion>
List of the versions of the secret. Attributes are specified below.
includeDeprecated Boolean
arn string
ARN of the secret.
id string
The provider-assigned unique ID for this managed resource.
name string
secretId string
versions GetSecretVersionsVersion[]
List of the versions of the secret. Attributes are specified below.
includeDeprecated boolean
arn str
ARN of the secret.
id str
The provider-assigned unique ID for this managed resource.
name str
secret_id str
versions Sequence[GetSecretVersionsVersion]
List of the versions of the secret. Attributes are specified below.
include_deprecated bool
arn String
ARN of the secret.
id String
The provider-assigned unique ID for this managed resource.
name String
secretId String
versions List<Property Map>
List of the versions of the secret. Attributes are specified below.
includeDeprecated Boolean

Supporting Types

GetSecretVersionsVersion

CreatedTime This property is required. string
Date and time this version of the secret was created.
LastAccessedDate This property is required. string
Date that this version of the secret was last accessed.
VersionId This property is required. string
Unique version identifier of this version of the secret.
VersionStages This property is required. List<string>
List of staging labels attached to the version.
CreatedTime This property is required. string
Date and time this version of the secret was created.
LastAccessedDate This property is required. string
Date that this version of the secret was last accessed.
VersionId This property is required. string
Unique version identifier of this version of the secret.
VersionStages This property is required. []string
List of staging labels attached to the version.
createdTime This property is required. String
Date and time this version of the secret was created.
lastAccessedDate This property is required. String
Date that this version of the secret was last accessed.
versionId This property is required. String
Unique version identifier of this version of the secret.
versionStages This property is required. List<String>
List of staging labels attached to the version.
createdTime This property is required. string
Date and time this version of the secret was created.
lastAccessedDate This property is required. string
Date that this version of the secret was last accessed.
versionId This property is required. string
Unique version identifier of this version of the secret.
versionStages This property is required. string[]
List of staging labels attached to the version.
created_time This property is required. str
Date and time this version of the secret was created.
last_accessed_date This property is required. str
Date that this version of the secret was last accessed.
version_id This property is required. str
Unique version identifier of this version of the secret.
version_stages This property is required. Sequence[str]
List of staging labels attached to the version.
createdTime This property is required. String
Date and time this version of the secret was created.
lastAccessedDate This property is required. String
Date that this version of the secret was last accessed.
versionId This property is required. String
Unique version identifier of this version of the secret.
versionStages This property is required. List<String>
List of staging labels attached to the version.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi