AWS v7.4.0 published on Wednesday, Aug 13, 2025 by Pulumi
aws.kms.getSecret
Explore with Pulumi AI
!> WARNING: This data source’s functionality was removed in version 2.0.0 of the AWS Provider. You can migrate existing configurations to the aws.kms.getSecrets
data source following instructions available in the Version 2 Upgrade Guide. This data source will be removed in a future version.
Using getSecret
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 getSecret(args: GetSecretArgs, opts?: InvokeOptions): Promise<GetSecretResult>
function getSecretOutput(args: GetSecretOutputArgs, opts?: InvokeOptions): Output<GetSecretResult>
def get_secret(region: Optional[str] = None,
secrets: Optional[Sequence[GetSecretSecret]] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretResult
def get_secret_output(region: Optional[pulumi.Input[str]] = None,
secrets: Optional[pulumi.Input[Sequence[pulumi.Input[GetSecretSecretArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecretResult]
func GetSecret(ctx *Context, args *GetSecretArgs, opts ...InvokeOption) (*GetSecretResult, error)
func GetSecretOutput(ctx *Context, args *GetSecretOutputArgs, opts ...InvokeOption) GetSecretResultOutput
> Note: This function is named GetSecret
in the Go SDK.
public static class GetSecret
{
public static Task<GetSecretResult> InvokeAsync(GetSecretArgs args, InvokeOptions? opts = null)
public static Output<GetSecretResult> Invoke(GetSecretInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
public static Output<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
fn::invoke:
function: aws:kms/getSecret:getSecret
arguments:
# arguments dictionary
The following arguments are supported:
- Secrets
[]Get
Secret Secret - Region string
- secrets
Get
Secret Secret[] - region string
- secrets List<Property Map>
- region String
getSecret Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Secrets
List<Get
Secret Secret>
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Secrets
[]Get
Secret Secret
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- secrets
List<Get
Secret Secret>
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- secrets
Get
Secret Secret[]
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- secrets
Sequence[Get
Secret Secret]
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- secrets List<Property Map>
Supporting Types
GetSecretSecret
- Name string
- Payload string
- Context Dictionary<string, string>
- Grant
Tokens List<string>
- Name string
- Payload string
- Context map[string]string
- Grant
Tokens []string
- name String
- payload String
- context Map<String,String>
- grant
Tokens List<String>
- name string
- payload string
- context {[key: string]: string}
- grant
Tokens string[]
- name str
- payload str
- context Mapping[str, str]
- grant_
tokens Sequence[str]
- name String
- payload String
- context Map<String>
- grant
Tokens List<String>
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.