Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi
published on Thursday, Aug 20, 2026 by Pulumi
Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi
published on Thursday, Aug 20, 2026 by Pulumi
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.secretsmanager.getSecretRotation({
secretId: exampleAwsSecretsmanagerSecret.id,
});
import pulumi
import pulumi_aws as aws
example = aws.secretsmanager.get_secret_rotation(secret_id=example_aws_secretsmanager_secret["id"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/secretsmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretsmanager.LookupSecretRotation(ctx, &secretsmanager.LookupSecretRotationArgs{
SecretId: exampleAwsSecretsmanagerSecret.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.SecretsManager.GetSecretRotation.Invoke(new()
{
SecretId = exampleAwsSecretsmanagerSecret.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.secretsmanager.SecretsmanagerFunctions;
import com.pulumi.aws.secretsmanager.inputs.GetSecretRotationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 example = SecretsmanagerFunctions.getSecretRotation(GetSecretRotationArgs.builder()
.secretId(exampleAwsSecretsmanagerSecret.id())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:secretsmanager:getSecretRotation
arguments:
secretId: ${exampleAwsSecretsmanagerSecret.id}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_secretsmanager_getsecretrotation" "example" {
secret_id = exampleAwsSecretsmanagerSecret.id
}
Using getSecretRotation
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 getSecretRotation(args: GetSecretRotationArgs, opts?: InvokeOptions): Promise<GetSecretRotationResult>
function getSecretRotationOutput(args: GetSecretRotationOutputArgs, opts?: InvokeOutputOptions): Output<GetSecretRotationResult>def get_secret_rotation(region: Optional[str] = None,
secret_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretRotationResult
def get_secret_rotation_output(region: pulumi.Input[Optional[str]] = None,
secret_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetSecretRotationResult]func LookupSecretRotation(ctx *Context, args *LookupSecretRotationArgs, opts ...InvokeOption) (*LookupSecretRotationResult, error)
func LookupSecretRotationOutput(ctx *Context, args *LookupSecretRotationOutputArgs, opts ...InvokeOption) LookupSecretRotationResultOutput> Note: This function is named LookupSecretRotation in the Go SDK.
public static class GetSecretRotation
{
public static Task<GetSecretRotationResult> InvokeAsync(GetSecretRotationArgs args, InvokeOptions? opts = null)
public static Output<GetSecretRotationResult> Invoke(GetSecretRotationInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetSecretRotationResult> Invoke(GetSecretRotationInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetSecretRotationResult> getSecretRotation(GetSecretRotationArgs args, InvokeOptions options)
public static Output<GetSecretRotationResult> getSecretRotation(GetSecretRotationArgs args, InvokeOptions options)
public static Output<GetSecretRotationResult> getSecretRotation(GetSecretRotationArgs args, InvokeOutputOptions options)
fn::invoke:
function: aws:secretsmanager/getSecretRotation:getSecretRotation
arguments:
# arguments dictionarydata "aws_secretsmanager_get_secret_rotation" "name" {
# arguments
}The following arguments are supported:
getSecretRotation Result
The following output properties are available:
- External
Secret List<GetRotation Metadatas Secret Rotation External Secret Rotation Metadata> - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - External
Secret stringRotation Role Arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Rotation
Enabled bool - Whether automatic rotation is enabled for this secret.
- Rotation
Lambda stringArn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- Rotation
Rules List<GetSecret Rotation Rotation Rule> - Configuration block for rotation rules. See
rotationRulesbelow. - Secret
Id string
- External
Secret []GetRotation Metadatas Secret Rotation External Secret Rotation Metadata - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - External
Secret stringRotation Role Arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Rotation
Enabled bool - Whether automatic rotation is enabled for this secret.
- Rotation
Lambda stringArn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- Rotation
Rules []GetSecret Rotation Rotation Rule - Configuration block for rotation rules. See
rotationRulesbelow. - Secret
Id string
- external_
secret_ list(object)rotation_ metadatas - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - external_
secret_ stringrotation_ role_ arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- rotation_
enabled bool - Whether automatic rotation is enabled for this secret.
- rotation_
lambda_ stringarn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- rotation_
rules list(object) - Configuration block for rotation rules. See
rotationRulesbelow. - secret_
id string
- external
Secret List<GetRotation Metadatas Secret Rotation External Secret Rotation Metadata> - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - external
Secret StringRotation Role Arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- rotation
Enabled Boolean - Whether automatic rotation is enabled for this secret.
- rotation
Lambda StringArn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- rotation
Rules List<GetSecret Rotation Rotation Rule> - Configuration block for rotation rules. See
rotationRulesbelow. - secret
Id String
- external
Secret GetRotation Metadatas Secret Rotation External Secret Rotation Metadata[] - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - external
Secret stringRotation Role Arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- rotation
Enabled boolean - Whether automatic rotation is enabled for this secret.
- rotation
Lambda stringArn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- rotation
Rules GetSecret Rotation Rotation Rule[] - Configuration block for rotation rules. See
rotationRulesbelow. - secret
Id string
- external_
secret_ Sequence[Getrotation_ metadatas Secret Rotation External Secret Rotation Metadata] - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - external_
secret_ strrotation_ role_ arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- rotation_
enabled bool - Whether automatic rotation is enabled for this secret.
- rotation_
lambda_ strarn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- rotation_
rules Sequence[GetSecret Rotation Rotation Rule] - Configuration block for rotation rules. See
rotationRulesbelow. - secret_
id str
- external
Secret List<Property Map>Rotation Metadatas - Metadata required by the external secret partner. See
externalSecretRotationMetadatabelow. - external
Secret StringRotation Role Arn - ARN of the IAM role that allows Secrets Manager to rotate the secret held by a third-party partner.
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- rotation
Enabled Boolean - Whether automatic rotation is enabled for this secret.
- rotation
Lambda StringArn - Amazon Resource Name (ARN) of the lambda function used for rotation.
- rotation
Rules List<Property Map> - Configuration block for rotation rules. See
rotationRulesbelow. - secret
Id String
Supporting Types
GetSecretRotationExternalSecretRotationMetadata
GetSecretRotationRotationRule
- Automatically
After intDays - Number of days between automatic scheduled rotations of the secret.
- Duration string
- Length of the rotation window in hours.
- Schedule
Expression string cron()orrate()expression that defines the schedule for rotating the secret.
- Automatically
After intDays - Number of days between automatic scheduled rotations of the secret.
- Duration string
- Length of the rotation window in hours.
- Schedule
Expression string cron()orrate()expression that defines the schedule for rotating the secret.
- automatically_
after_ numberdays - Number of days between automatic scheduled rotations of the secret.
- duration string
- Length of the rotation window in hours.
- schedule_
expression string cron()orrate()expression that defines the schedule for rotating the secret.
- automatically
After IntegerDays - Number of days between automatic scheduled rotations of the secret.
- duration String
- Length of the rotation window in hours.
- schedule
Expression String cron()orrate()expression that defines the schedule for rotating the secret.
- automatically
After numberDays - Number of days between automatic scheduled rotations of the secret.
- duration string
- Length of the rotation window in hours.
- schedule
Expression string cron()orrate()expression that defines the schedule for rotating the secret.
- automatically_
after_ intdays - Number of days between automatic scheduled rotations of the secret.
- duration str
- Length of the rotation window in hours.
- schedule_
expression str cron()orrate()expression that defines the schedule for rotating the secret.
- automatically
After NumberDays - Number of days between automatic scheduled rotations of the secret.
- duration String
- Length of the rotation window in hours.
- schedule
Expression String cron()orrate()expression that defines the schedule for rotating the secret.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi
published on Thursday, Aug 20, 2026 by Pulumi