1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getServiceAccounts
MongoDB Atlas v4.2.0 published on Friday, Jan 23, 2026 by Pulumi
mongodbatlas logo
MongoDB Atlas v4.2.0 published on Friday, Jan 23, 2026 by Pulumi

    Example Usage

    Using getServiceAccounts

    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 getServiceAccounts(args: GetServiceAccountsArgs, opts?: InvokeOptions): Promise<GetServiceAccountsResult>
    function getServiceAccountsOutput(args: GetServiceAccountsOutputArgs, opts?: InvokeOptions): Output<GetServiceAccountsResult>
    def get_service_accounts(org_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetServiceAccountsResult
    def get_service_accounts_output(org_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetServiceAccountsResult]
    func LookupServiceAccounts(ctx *Context, args *LookupServiceAccountsArgs, opts ...InvokeOption) (*LookupServiceAccountsResult, error)
    func LookupServiceAccountsOutput(ctx *Context, args *LookupServiceAccountsOutputArgs, opts ...InvokeOption) LookupServiceAccountsResultOutput

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

    public static class GetServiceAccounts 
    {
        public static Task<GetServiceAccountsResult> InvokeAsync(GetServiceAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceAccountsResult> Invoke(GetServiceAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceAccountsResult> getServiceAccounts(GetServiceAccountsArgs args, InvokeOptions options)
    public static Output<GetServiceAccountsResult> getServiceAccounts(GetServiceAccountsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getServiceAccounts:getServiceAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.

    getServiceAccounts Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Results List<GetServiceAccountsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Results []GetServiceAccountsResult
    List of returned documents that MongoDB Cloud provides when completing this request.
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results List<GetServiceAccountsResult>
    List of returned documents that MongoDB Cloud provides when completing this request.
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results GetServiceAccountsResult[]
    List of returned documents that MongoDB Cloud provides when completing this request.
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results Sequence[GetServiceAccountsResult]
    List of returned documents that MongoDB Cloud provides when completing this request.
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    results List<Property Map>
    List of returned documents that MongoDB Cloud provides when completing this request.

    Supporting Types

    GetServiceAccountsResult

    ClientId string
    The Client ID of the Service Account.
    CreatedAt string
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Description string
    Human readable description for the Service Account.
    Name string
    Human-readable name for the Service Account.
    Roles List<string>
    A list of Organization roles associated with the Service Account.
    Secrets List<GetServiceAccountsResultSecret>
    A list of secrets associated with the specified Service Account.
    ClientId string
    The Client ID of the Service Account.
    CreatedAt string
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    Description string
    Human readable description for the Service Account.
    Name string
    Human-readable name for the Service Account.
    Roles []string
    A list of Organization roles associated with the Service Account.
    Secrets []GetServiceAccountsResultSecret
    A list of secrets associated with the specified Service Account.
    clientId String
    The Client ID of the Service Account.
    createdAt String
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    description String
    Human readable description for the Service Account.
    name String
    Human-readable name for the Service Account.
    roles List<String>
    A list of Organization roles associated with the Service Account.
    secrets List<GetServiceAccountsResultSecret>
    A list of secrets associated with the specified Service Account.
    clientId string
    The Client ID of the Service Account.
    createdAt string
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    description string
    Human readable description for the Service Account.
    name string
    Human-readable name for the Service Account.
    roles string[]
    A list of Organization roles associated with the Service Account.
    secrets GetServiceAccountsResultSecret[]
    A list of secrets associated with the specified Service Account.
    client_id str
    The Client ID of the Service Account.
    created_at str
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    description str
    Human readable description for the Service Account.
    name str
    Human-readable name for the Service Account.
    roles Sequence[str]
    A list of Organization roles associated with the Service Account.
    secrets Sequence[GetServiceAccountsResultSecret]
    A list of secrets associated with the specified Service Account.
    clientId String
    The Client ID of the Service Account.
    createdAt String
    The date that the Service Account was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    description String
    Human readable description for the Service Account.
    name String
    Human-readable name for the Service Account.
    roles List<String>
    A list of Organization roles associated with the Service Account.
    secrets List<Property Map>
    A list of secrets associated with the specified Service Account.

    GetServiceAccountsResultSecret

    CreatedAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ExpiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    LastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    MaskedSecretValue string
    The masked Service Account secret.
    SecretId string
    Unique 24-hexadecimal digit string that identifies the secret.
    CreatedAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    ExpiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    LastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    MaskedSecretValue string
    The masked Service Account secret.
    SecretId string
    Unique 24-hexadecimal digit string that identifies the secret.
    createdAt String
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt String
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    lastUsedAt String
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue String
    The masked Service Account secret.
    secretId String
    Unique 24-hexadecimal digit string that identifies the secret.
    createdAt string
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt string
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    lastUsedAt string
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue string
    The masked Service Account secret.
    secretId string
    Unique 24-hexadecimal digit string that identifies the secret.
    created_at str
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expires_at str
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    last_used_at str
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    masked_secret_value str
    The masked Service Account secret.
    secret_id str
    Unique 24-hexadecimal digit string that identifies the secret.
    createdAt String
    The date that the secret was created on. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    expiresAt String
    The date for the expiration of the secret. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    lastUsedAt String
    The last time the secret was used. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
    maskedSecretValue String
    The masked Service Account secret.
    secretId String
    Unique 24-hexadecimal digit string that identifies the secret.

    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.2.0 published on Friday, Jan 23, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate