DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
# danubedata.getStorageAccessKeys
Lists all S3 storage access keys in your account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getStorageAccessKeys({});
export const keyCount = all.then(all => all.keys).length;
export const activeKeys = all.then(all => .filter(k => k.status == "active").map(k => (k.name)));
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_storage_access_keys()
pulumi.export("keyCount", len(all.keys))
pulumi.export("activeKeys", [k.name for k in all.keys if k.status == "active"])
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetStorageAccessKeys(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("keyCount", pulumi.Int(len(all.Keys)))
ctx.Export("activeKeys", pulumi.StringArray("TODO: For expression"))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetStorageAccessKeys.Invoke();
return new Dictionary<string, object?>
{
["keyCount"] = all.Apply(getStorageAccessKeysResult => getStorageAccessKeysResult.Keys).Length,
["activeKeys"] = .Where(k => k.Status == "active").Select(k =>
{
return k.Name;
}).ToList(),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
import java.util.List;
import java.util.ArrayList;
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 all = DanubedataFunctions.getStorageAccessKeys();
ctx.export("keyCount", all.applyValue(getStorageAccessKeysResult -> getStorageAccessKeysResult.keys()).length());
ctx.export("activeKeys", "TODO: ForExpression");
}
}
Example coming soon!
Find Key by Name
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getStorageAccessKeys({});
const appKey = all.then(all => .filter(k => k.name == "app-access-key").map(k => (k))[0]);
export const appAccessKeyId = appKey.accessKeyId;
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_storage_access_keys()
app_key = [k for k in all.keys if k.name == "app-access-key"][0]
pulumi.export("appAccessKeyId", app_key.access_key_id)
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetStorageAccessKeys(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
appKey := "TODO: For expression"[0]
ctx.Export("appAccessKeyId", appKey.AccessKeyId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetStorageAccessKeys.Invoke();
var appKey = .Where(k => k.Name == "app-access-key").Select(k =>
{
return k;
}).ToList()[0];
return new Dictionary<string, object?>
{
["appAccessKeyId"] = appKey.AccessKeyId,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
import java.util.List;
import java.util.ArrayList;
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 all = DanubedataFunctions.getStorageAccessKeys();
final var appKey = "TODO: ForExpression"[0];
ctx.export("appAccessKeyId", appKey.accessKeyId());
}
}
Example coming soon!
Filter Active Keys
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@pulumi/danubedata";
const all = danubedata.getStorageAccessKeys({});
const activeKeys = all.then(all => .filter(k => k.status == "active" && !k.isExpired).map(k => (k)));
const expiredKeys = all.then(all => .filter(k => k.isExpired).map(k => (k)));
export const activeCount = activeKeys.length;
export const expiredCount = expiredKeys.apply(expiredKeys => expiredKeys.length);
import pulumi
import pulumi_danubedata as danubedata
all = danubedata.get_storage_access_keys()
active_keys = [k for k in all.keys if k.status == "active" and not k.is_expired]
expired_keys = [k for k in all.keys if k.is_expired]
pulumi.export("activeCount", len(active_keys))
pulumi.export("expiredCount", len(expired_keys))
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := danubedata.GetStorageAccessKeys(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
activeKeys := "TODO: For expression"
expiredKeys := "TODO: For expression"
ctx.Export("activeCount", pulumi.Int(len(activeKeys)))
ctx.Export("expiredCount", pulumi.Int(len(expiredKeys)))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = Pulumi.DanubeData;
return await Deployment.RunAsync(() =>
{
var all = DanubeData.GetStorageAccessKeys.Invoke();
var activeKeys = .Where(k => k.Status == "active" && !k.IsExpired).Select(k =>
{
return k;
}).ToList();
var expiredKeys = ;
return new Dictionary<string, object?>
{
["activeCount"] = activeKeys.Length,
["expiredCount"] = expiredKeys.Apply(expiredKeys => expiredKeys.Length),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.DanubedataFunctions;
import java.util.List;
import java.util.ArrayList;
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 all = DanubedataFunctions.getStorageAccessKeys();
final var activeKeys = "TODO: ForExpression";
final var expiredKeys = "TODO: ForExpression";
ctx.export("activeCount", activeKeys.length());
ctx.export("expiredCount", expiredKeys.length());
}
}
Example coming soon!
Notes
- The
secret_access_keyis not included in this data source for security reasons. - Secret access keys are only available during creation.
- To get a new secret key, create a new access key resource.
Using getStorageAccessKeys
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 getStorageAccessKeys(opts?: InvokeOptions): Promise<GetStorageAccessKeysResult>
function getStorageAccessKeysOutput(opts?: InvokeOptions): Output<GetStorageAccessKeysResult>def get_storage_access_keys(opts: Optional[InvokeOptions] = None) -> GetStorageAccessKeysResult
def get_storage_access_keys_output(opts: Optional[InvokeOptions] = None) -> Output[GetStorageAccessKeysResult]func GetStorageAccessKeys(ctx *Context, opts ...InvokeOption) (*GetStorageAccessKeysResult, error)
func GetStorageAccessKeysOutput(ctx *Context, opts ...InvokeOption) GetStorageAccessKeysResultOutput> Note: This function is named GetStorageAccessKeys in the Go SDK.
public static class GetStorageAccessKeys
{
public static Task<GetStorageAccessKeysResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetStorageAccessKeysResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetStorageAccessKeysResult> getStorageAccessKeys(InvokeOptions options)
public static Output<GetStorageAccessKeysResult> getStorageAccessKeys(InvokeOptions options)
fn::invoke:
function: danubedata:index/getStorageAccessKeys:getStorageAccessKeys
arguments:
# arguments dictionarygetStorageAccessKeys Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Keys
List<Danube
Data. Danube Data. Outputs. Get Storage Access Keys Key> - List of storage access keys. Each key contains:
- Id string
- The provider-assigned unique ID for this managed resource.
- Keys
[]Get
Storage Access Keys Key - List of storage access keys. Each key contains:
- id String
- The provider-assigned unique ID for this managed resource.
- keys
List<Get
Storage Access Keys Key> - List of storage access keys. Each key contains:
- id string
- The provider-assigned unique ID for this managed resource.
- keys
Get
Storage Access Keys Key[] - List of storage access keys. Each key contains:
- id str
- The provider-assigned unique ID for this managed resource.
- keys
Sequence[Get
Storage Access Keys Key] - List of storage access keys. Each key contains:
- id String
- The provider-assigned unique ID for this managed resource.
- keys List<Property Map>
- List of storage access keys. Each key contains:
Supporting Types
GetStorageAccessKeysKey
- Access
Key stringId - The S3 access key ID for authentication.
- Access
Type string - Access type (full or restricted).
- Created
At string - Timestamp when the key was created.
- Expires
At string - Expiration timestamp (if set).
- Id string
- Unique identifier for the access key.
- Is
Expired bool - Whether the key has expired.
- Is
Prefix boolScoped - Whether the key is scoped to specific bucket prefixes.
- Last
Used stringAt - Timestamp when the key was last used.
- Name string
- Name of the access key.
- Status string
- Current status (active, revoked).
- Access
Key stringId - The S3 access key ID for authentication.
- Access
Type string - Access type (full or restricted).
- Created
At string - Timestamp when the key was created.
- Expires
At string - Expiration timestamp (if set).
- Id string
- Unique identifier for the access key.
- Is
Expired bool - Whether the key has expired.
- Is
Prefix boolScoped - Whether the key is scoped to specific bucket prefixes.
- Last
Used stringAt - Timestamp when the key was last used.
- Name string
- Name of the access key.
- Status string
- Current status (active, revoked).
- access
Key StringId - The S3 access key ID for authentication.
- access
Type String - Access type (full or restricted).
- created
At String - Timestamp when the key was created.
- expires
At String - Expiration timestamp (if set).
- id String
- Unique identifier for the access key.
- is
Expired Boolean - Whether the key has expired.
- is
Prefix BooleanScoped - Whether the key is scoped to specific bucket prefixes.
- last
Used StringAt - Timestamp when the key was last used.
- name String
- Name of the access key.
- status String
- Current status (active, revoked).
- access
Key stringId - The S3 access key ID for authentication.
- access
Type string - Access type (full or restricted).
- created
At string - Timestamp when the key was created.
- expires
At string - Expiration timestamp (if set).
- id string
- Unique identifier for the access key.
- is
Expired boolean - Whether the key has expired.
- is
Prefix booleanScoped - Whether the key is scoped to specific bucket prefixes.
- last
Used stringAt - Timestamp when the key was last used.
- name string
- Name of the access key.
- status string
- Current status (active, revoked).
- access_
key_ strid - The S3 access key ID for authentication.
- access_
type str - Access type (full or restricted).
- created_
at str - Timestamp when the key was created.
- expires_
at str - Expiration timestamp (if set).
- id str
- Unique identifier for the access key.
- is_
expired bool - Whether the key has expired.
- is_
prefix_ boolscoped - Whether the key is scoped to specific bucket prefixes.
- last_
used_ strat - Timestamp when the key was last used.
- name str
- Name of the access key.
- status str
- Current status (active, revoked).
- access
Key StringId - The S3 access key ID for authentication.
- access
Type String - Access type (full or restricted).
- created
At String - Timestamp when the key was created.
- expires
At String - Expiration timestamp (if set).
- id String
- Unique identifier for the access key.
- is
Expired Boolean - Whether the key has expired.
- is
Prefix BooleanScoped - Whether the key is scoped to specific bucket prefixes.
- last
Used StringAt - Timestamp when the key was last used.
- name String
- Name of the access key.
- status String
- Current status (active, revoked).
Package Details
- Repository
- danubedata AdrianSilaghi/pulumi-danubedata
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
danubedataTerraform Provider.
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
