GetSecretRotation

Retrieve information about a Secrets Manager secret rotation. To retrieve secret metadata, see the aws.secretsmanager.Secret data source. To retrieve a secret value, see the aws.secretsmanager.SecretVersion data source.

Example Usage

Retrieve Secret Rotation Configuration

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.SecretsManager.GetSecretRotation.InvokeAsync(new Aws.SecretsManager.GetSecretRotationArgs
        {
            SecretId = data.Aws_secretsmanager_secret.Example.Id,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/secretsmanager"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := secretsmanager.LookupSecretRotation(ctx, &secretsmanager.LookupSecretRotationArgs{
            SecretId: data.Aws_secretsmanager_secret.Example.Id,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.secretsmanager.get_secret_rotation(secret_id=data["aws_secretsmanager_secret"]["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws_secretsmanager_secret_example.id.apply(id => aws.secretsmanager.getSecretRotation({
    secretId: id,
}, { async: true }));

Using GetSecretRotation

function getSecretRotation(args: GetSecretRotationArgs, opts?: InvokeOptions): Promise<GetSecretRotationResult>
function  get_secret_rotation(secret_id=None, opts=None)
func LookupSecretRotation(ctx *Context, args *LookupSecretRotationArgs, opts ...InvokeOption) (*LookupSecretRotationResult, error)

Note: This function is named LookupSecretRotation in the Go SDK.

public static class GetSecretRotation {
    public static Task<GetSecretRotationResult> InvokeAsync(GetSecretRotationArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

SecretId string

Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

SecretId string

Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

secretId string

Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

secret_id str

Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

GetSecretRotation Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

RotationEnabled bool

The ARN of the secret.

RotationLambdaArn string

The decrypted part of the protected secret information that was originally provided as a string.

RotationRules List<GetSecretRotationRotationRule>

The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.

SecretId string
Id string

The provider-assigned unique ID for this managed resource.

RotationEnabled bool

The ARN of the secret.

RotationLambdaArn string

The decrypted part of the protected secret information that was originally provided as a string.

RotationRules []GetSecretRotationRotationRule

The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.

SecretId string
id string

The provider-assigned unique ID for this managed resource.

rotationEnabled boolean

The ARN of the secret.

rotationLambdaArn string

The decrypted part of the protected secret information that was originally provided as a string.

rotationRules GetSecretRotationRotationRule[]

The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.

secretId string
id str

The provider-assigned unique ID for this managed resource.

rotation_enabled bool

The ARN of the secret.

rotation_lambda_arn str

The decrypted part of the protected secret information that was originally provided as a string.

rotation_rules List[GetSecretRotationRotationRule]

The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded.

secret_id str

Supporting Types

GetSecretRotationRotationRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AutomaticallyAfterDays int
AutomaticallyAfterDays int
automaticallyAfterDays number
automaticallyAfterDays float

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.