1. Packages
  2. DanubeData
  3. API Docs
  4. getStorageAccessKeys
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
danubedata logo
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_key is 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 dictionary

    getStorageAccessKeys Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Keys List<DanubeData.DanubeData.Outputs.GetStorageAccessKeysKey>
    List of storage access keys. Each key contains:
    Id string
    The provider-assigned unique ID for this managed resource.
    Keys []GetStorageAccessKeysKey
    List of storage access keys. Each key contains:
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<GetStorageAccessKeysKey>
    List of storage access keys. Each key contains:
    id string
    The provider-assigned unique ID for this managed resource.
    keys GetStorageAccessKeysKey[]
    List of storage access keys. Each key contains:
    id str
    The provider-assigned unique ID for this managed resource.
    keys Sequence[GetStorageAccessKeysKey]
    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

    AccessKeyId string
    The S3 access key ID for authentication.
    AccessType string
    Access type (full or restricted).
    CreatedAt string
    Timestamp when the key was created.
    ExpiresAt string
    Expiration timestamp (if set).
    Id string
    Unique identifier for the access key.
    IsExpired bool
    Whether the key has expired.
    IsPrefixScoped bool
    Whether the key is scoped to specific bucket prefixes.
    LastUsedAt string
    Timestamp when the key was last used.
    Name string
    Name of the access key.
    Status string
    Current status (active, revoked).
    AccessKeyId string
    The S3 access key ID for authentication.
    AccessType string
    Access type (full or restricted).
    CreatedAt string
    Timestamp when the key was created.
    ExpiresAt string
    Expiration timestamp (if set).
    Id string
    Unique identifier for the access key.
    IsExpired bool
    Whether the key has expired.
    IsPrefixScoped bool
    Whether the key is scoped to specific bucket prefixes.
    LastUsedAt string
    Timestamp when the key was last used.
    Name string
    Name of the access key.
    Status string
    Current status (active, revoked).
    accessKeyId String
    The S3 access key ID for authentication.
    accessType String
    Access type (full or restricted).
    createdAt String
    Timestamp when the key was created.
    expiresAt String
    Expiration timestamp (if set).
    id String
    Unique identifier for the access key.
    isExpired Boolean
    Whether the key has expired.
    isPrefixScoped Boolean
    Whether the key is scoped to specific bucket prefixes.
    lastUsedAt String
    Timestamp when the key was last used.
    name String
    Name of the access key.
    status String
    Current status (active, revoked).
    accessKeyId string
    The S3 access key ID for authentication.
    accessType string
    Access type (full or restricted).
    createdAt string
    Timestamp when the key was created.
    expiresAt string
    Expiration timestamp (if set).
    id string
    Unique identifier for the access key.
    isExpired boolean
    Whether the key has expired.
    isPrefixScoped boolean
    Whether the key is scoped to specific bucket prefixes.
    lastUsedAt string
    Timestamp when the key was last used.
    name string
    Name of the access key.
    status string
    Current status (active, revoked).
    access_key_id str
    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_scoped bool
    Whether the key is scoped to specific bucket prefixes.
    last_used_at str
    Timestamp when the key was last used.
    name str
    Name of the access key.
    status str
    Current status (active, revoked).
    accessKeyId String
    The S3 access key ID for authentication.
    accessType String
    Access type (full or restricted).
    createdAt String
    Timestamp when the key was created.
    expiresAt String
    Expiration timestamp (if set).
    id String
    Unique identifier for the access key.
    isExpired Boolean
    Whether the key has expired.
    isPrefixScoped Boolean
    Whether the key is scoped to specific bucket prefixes.
    lastUsedAt String
    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 danubedata Terraform Provider.
    danubedata logo
    DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
      Meet Neo: Your AI Platform Teammate