Class GetDefaultKmsKey
Inheritance
System.Object
GetDefaultKmsKey
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ebs
Assembly: Pulumi.Aws.dll
Syntax
public static class GetDefaultKmsKey
Methods
View SourceInvokeAsync(InvokeOptions)
Use this data source to get the default EBS encryption KMS key in the current region.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Aws.Ebs.GetDefaultKmsKey.InvokeAsync());
var example = new Aws.Ebs.Volume("example", new Aws.Ebs.VolumeArgs
{
AvailabilityZone = "us-west-2a",
Encrypted = true,
KmsKeyId = current.Apply(current => current.KeyArn),
});
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetDefaultKmsKeyResult> InvokeAsync(InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetDefaultKmsKeyResult> |