1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getAccessListApiKeys
MongoDB Atlas v4.4.0 published on Thursday, Feb 19, 2026 by Pulumi
mongodbatlas logo
MongoDB Atlas v4.4.0 published on Thursday, Feb 19, 2026 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const testAccessListApiKey = new mongodbatlas.AccessListApiKey("test", {
        orgId: "<ORG_ID>",
        cidrBlock: "1.2.3.4/32",
        apiKeyId: "a29120e123cd",
    });
    const test = mongodbatlas.getAccessListApiKeysOutput({
        orgId: testAccessListApiKey.orgId,
        apiKeyId: testAccessListApiKey.apiKeyId,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_access_list_api_key = mongodbatlas.AccessListApiKey("test",
        org_id="<ORG_ID>",
        cidr_block="1.2.3.4/32",
        api_key_id="a29120e123cd")
    test = mongodbatlas.get_access_list_api_keys_output(org_id=test_access_list_api_key.org_id,
        api_key_id=test_access_list_api_key.api_key_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testAccessListApiKey, err := mongodbatlas.NewAccessListApiKey(ctx, "test", &mongodbatlas.AccessListApiKeyArgs{
    			OrgId:     pulumi.String("<ORG_ID>"),
    			CidrBlock: pulumi.String("1.2.3.4/32"),
    			ApiKeyId:  pulumi.String("a29120e123cd"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = mongodbatlas.LookupAccessListApiKeysOutput(ctx, mongodbatlas.GetAccessListApiKeysOutputArgs{
    			OrgId:    testAccessListApiKey.OrgId,
    			ApiKeyId: testAccessListApiKey.ApiKeyId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var testAccessListApiKey = new Mongodbatlas.AccessListApiKey("test", new()
        {
            OrgId = "<ORG_ID>",
            CidrBlock = "1.2.3.4/32",
            ApiKeyId = "a29120e123cd",
        });
    
        var test = Mongodbatlas.GetAccessListApiKeys.Invoke(new()
        {
            OrgId = testAccessListApiKey.OrgId,
            ApiKeyId = testAccessListApiKey.ApiKeyId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.AccessListApiKey;
    import com.pulumi.mongodbatlas.AccessListApiKeyArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetAccessListApiKeysArgs;
    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) {
            var testAccessListApiKey = new AccessListApiKey("testAccessListApiKey", AccessListApiKeyArgs.builder()
                .orgId("<ORG_ID>")
                .cidrBlock("1.2.3.4/32")
                .apiKeyId("a29120e123cd")
                .build());
    
            final var test = MongodbatlasFunctions.getAccessListApiKeys(GetAccessListApiKeysArgs.builder()
                .orgId(testAccessListApiKey.orgId())
                .apiKeyId(testAccessListApiKey.apiKeyId())
                .build());
    
        }
    }
    
    resources:
      testAccessListApiKey:
        type: mongodbatlas:AccessListApiKey
        name: test
        properties:
          orgId: <ORG_ID>
          cidrBlock: 1.2.3.4/32
          apiKeyId: a29120e123cd
    variables:
      test:
        fn::invoke:
          function: mongodbatlas:getAccessListApiKeys
          arguments:
            orgId: ${testAccessListApiKey.orgId}
            apiKeyId: ${testAccessListApiKey.apiKeyId}
    

    Using getAccessListApiKeys

    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 getAccessListApiKeys(args: GetAccessListApiKeysArgs, opts?: InvokeOptions): Promise<GetAccessListApiKeysResult>
    function getAccessListApiKeysOutput(args: GetAccessListApiKeysOutputArgs, opts?: InvokeOptions): Output<GetAccessListApiKeysResult>
    def get_access_list_api_keys(api_key_id: Optional[str] = None,
                                 items_per_page: Optional[int] = None,
                                 org_id: Optional[str] = None,
                                 page_num: Optional[int] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAccessListApiKeysResult
    def get_access_list_api_keys_output(api_key_id: Optional[pulumi.Input[str]] = None,
                                 items_per_page: Optional[pulumi.Input[int]] = None,
                                 org_id: Optional[pulumi.Input[str]] = None,
                                 page_num: Optional[pulumi.Input[int]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetAccessListApiKeysResult]
    func LookupAccessListApiKeys(ctx *Context, args *LookupAccessListApiKeysArgs, opts ...InvokeOption) (*LookupAccessListApiKeysResult, error)
    func LookupAccessListApiKeysOutput(ctx *Context, args *LookupAccessListApiKeysOutputArgs, opts ...InvokeOption) LookupAccessListApiKeysResultOutput

    > Note: This function is named LookupAccessListApiKeys in the Go SDK.

    public static class GetAccessListApiKeys 
    {
        public static Task<GetAccessListApiKeysResult> InvokeAsync(GetAccessListApiKeysArgs args, InvokeOptions? opts = null)
        public static Output<GetAccessListApiKeysResult> Invoke(GetAccessListApiKeysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccessListApiKeysResult> getAccessListApiKeys(GetAccessListApiKeysArgs args, InvokeOptions options)
    public static Output<GetAccessListApiKeysResult> getAccessListApiKeys(GetAccessListApiKeysArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getAccessListApiKeys:getAccessListApiKeys
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApiKeyId string
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    ItemsPerPage int
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    PageNum int
    The page to return. Defaults to 1.
    ApiKeyId string
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    ItemsPerPage int
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    PageNum int
    The page to return. Defaults to 1.
    apiKeyId String
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    itemsPerPage Integer
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    pageNum Integer
    The page to return. Defaults to 1.
    apiKeyId string
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    itemsPerPage number
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    pageNum number
    The page to return. Defaults to 1.
    api_key_id str
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    items_per_page int
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    page_num int
    The page to return. Defaults to 1.
    apiKeyId String
    Unique identifier for the Organization API Key for which you want to retrieve access list entries.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    itemsPerPage Number
    Number of items to return per page, up to a maximum of 500. Defaults to 100.
    pageNum Number
    The page to return. Defaults to 1.

    getAccessListApiKeys Result

    The following output properties are available:

    ApiKeyId string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Results List<GetAccessListApiKeysResult>
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    ItemsPerPage int
    PageNum int
    ApiKeyId string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Results []GetAccessListApiKeysResult
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    ItemsPerPage int
    PageNum int
    apiKeyId String
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    results List<GetAccessListApiKeysResult>
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    itemsPerPage Integer
    pageNum Integer
    apiKeyId string
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    results GetAccessListApiKeysResult[]
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    itemsPerPage number
    pageNum number
    api_key_id str
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    results Sequence[GetAccessListApiKeysResult]
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    items_per_page int
    page_num int
    apiKeyId String
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    results List<Property Map>
    A list of access list entries for the specified API key. Each entry contains the following attributes:
    itemsPerPage Number
    pageNum Number

    Supporting Types

    GetAccessListApiKeysResult

    AccessCount int
    Total number of requests that have originated from this IP address or CIDR block.
    CidrBlock string
    Range of IP addresses in CIDR notation included in the API access list.
    Created string
    Date and time when the access list entry was created.
    IpAddress string
    IP address included in the API access list.
    LastUsed string
    Date and time when the API key was last used from this IP address or CIDR block.
    LastUsedAddress string
    IP address from which the last API request was made.
    AccessCount int
    Total number of requests that have originated from this IP address or CIDR block.
    CidrBlock string
    Range of IP addresses in CIDR notation included in the API access list.
    Created string
    Date and time when the access list entry was created.
    IpAddress string
    IP address included in the API access list.
    LastUsed string
    Date and time when the API key was last used from this IP address or CIDR block.
    LastUsedAddress string
    IP address from which the last API request was made.
    accessCount Integer
    Total number of requests that have originated from this IP address or CIDR block.
    cidrBlock String
    Range of IP addresses in CIDR notation included in the API access list.
    created String
    Date and time when the access list entry was created.
    ipAddress String
    IP address included in the API access list.
    lastUsed String
    Date and time when the API key was last used from this IP address or CIDR block.
    lastUsedAddress String
    IP address from which the last API request was made.
    accessCount number
    Total number of requests that have originated from this IP address or CIDR block.
    cidrBlock string
    Range of IP addresses in CIDR notation included in the API access list.
    created string
    Date and time when the access list entry was created.
    ipAddress string
    IP address included in the API access list.
    lastUsed string
    Date and time when the API key was last used from this IP address or CIDR block.
    lastUsedAddress string
    IP address from which the last API request was made.
    access_count int
    Total number of requests that have originated from this IP address or CIDR block.
    cidr_block str
    Range of IP addresses in CIDR notation included in the API access list.
    created str
    Date and time when the access list entry was created.
    ip_address str
    IP address included in the API access list.
    last_used str
    Date and time when the API key was last used from this IP address or CIDR block.
    last_used_address str
    IP address from which the last API request was made.
    accessCount Number
    Total number of requests that have originated from this IP address or CIDR block.
    cidrBlock String
    Range of IP addresses in CIDR notation included in the API access list.
    created String
    Date and time when the access list entry was created.
    ipAddress String
    IP address included in the API access list.
    lastUsed String
    Date and time when the API key was last used from this IP address or CIDR block.
    lastUsedAddress String
    IP address from which the last API request was made.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v4.4.0 published on Thursday, Feb 19, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate