1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. getAuditing
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

mongodbatlas.getAuditing

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

    # Data Source: mongodbatlas.Auditing

    mongodbatlas.Auditing describes a Auditing.

    NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const testAuditing = new mongodbatlas.Auditing("test", {
        projectId: "<project-id>",
        auditFilter: "{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}",
        auditAuthorizationSuccess: false,
        enabled: true,
    });
    const test = mongodbatlas.getAuditingOutput({
        projectId: testAuditing.id,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test_auditing = mongodbatlas.Auditing("test",
        project_id="<project-id>",
        audit_filter="{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}",
        audit_authorization_success=False,
        enabled=True)
    test = mongodbatlas.get_auditing_output(project_id=test_auditing.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testAuditing, err := mongodbatlas.NewAuditing(ctx, "test", &mongodbatlas.AuditingArgs{
    			ProjectId:                 pulumi.String("<project-id>"),
    			AuditFilter:               pulumi.String("{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}"),
    			AuditAuthorizationSuccess: pulumi.Bool(false),
    			Enabled:                   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_ = mongodbatlas.LookupAuditingOutput(ctx, mongodbatlas.GetAuditingOutputArgs{
    			ProjectId: testAuditing.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var testAuditing = new Mongodbatlas.Auditing("test", new()
        {
            ProjectId = "<project-id>",
            AuditFilter = "{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}",
            AuditAuthorizationSuccess = false,
            Enabled = true,
        });
    
        var test = Mongodbatlas.GetAuditing.Invoke(new()
        {
            ProjectId = testAuditing.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.Auditing;
    import com.pulumi.mongodbatlas.AuditingArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetAuditingArgs;
    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 testAuditing = new Auditing("testAuditing", AuditingArgs.builder()
                .projectId("<project-id>")
                .auditFilter("{ 'atype': 'authenticate', 'param': {   'user': 'auditAdmin',   'db': 'admin',   'mechanism': 'SCRAM-SHA-1' }}")
                .auditAuthorizationSuccess(false)
                .enabled(true)
                .build());
    
            final var test = MongodbatlasFunctions.getAuditing(GetAuditingArgs.builder()
                .projectId(testAuditing.id())
                .build());
    
        }
    }
    
    resources:
      testAuditing:
        type: mongodbatlas:Auditing
        name: test
        properties:
          projectId: <project-id>
          auditFilter: '{ ''atype'': ''authenticate'', ''param'': {   ''user'': ''auditAdmin'',   ''db'': ''admin'',   ''mechanism'': ''SCRAM-SHA-1'' }}'
          auditAuthorizationSuccess: false
          enabled: true
    variables:
      test:
        fn::invoke:
          Function: mongodbatlas:getAuditing
          Arguments:
            projectId: ${testAuditing.id}
    

    Using getAuditing

    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 getAuditing(args: GetAuditingArgs, opts?: InvokeOptions): Promise<GetAuditingResult>
    function getAuditingOutput(args: GetAuditingOutputArgs, opts?: InvokeOptions): Output<GetAuditingResult>
    def get_auditing(project_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetAuditingResult
    def get_auditing_output(project_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetAuditingResult]
    func LookupAuditing(ctx *Context, args *LookupAuditingArgs, opts ...InvokeOption) (*LookupAuditingResult, error)
    func LookupAuditingOutput(ctx *Context, args *LookupAuditingOutputArgs, opts ...InvokeOption) LookupAuditingResultOutput

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

    public static class GetAuditing 
    {
        public static Task<GetAuditingResult> InvokeAsync(GetAuditingArgs args, InvokeOptions? opts = null)
        public static Output<GetAuditingResult> Invoke(GetAuditingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuditingResult> getAuditing(GetAuditingArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: mongodbatlas:index/getAuditing:getAuditing
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    The unique ID for the project to create the database user.
    ProjectId string
    The unique ID for the project to create the database user.
    projectId String
    The unique ID for the project to create the database user.
    projectId string
    The unique ID for the project to create the database user.
    project_id str
    The unique ID for the project to create the database user.
    projectId String
    The unique ID for the project to create the database user.

    getAuditing Result

    The following output properties are available:

    AuditAuthorizationSuccess bool
    JSON-formatted audit filter used by the project
    AuditFilter string
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    ConfigurationType string
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    Enabled bool
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    AuditAuthorizationSuccess bool
    JSON-formatted audit filter used by the project
    AuditFilter string
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    ConfigurationType string
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    Enabled bool
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    auditAuthorizationSuccess Boolean
    JSON-formatted audit filter used by the project
    auditFilter String
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    configurationType String
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    enabled Boolean
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    auditAuthorizationSuccess boolean
    JSON-formatted audit filter used by the project
    auditFilter string
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    configurationType string
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    enabled boolean
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    audit_authorization_success bool
    JSON-formatted audit filter used by the project
    audit_filter str
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    configuration_type str
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    enabled bool
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    auditAuthorizationSuccess Boolean
    JSON-formatted audit filter used by the project
    auditFilter String
    Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
    configurationType String
    Denotes the configuration method for the audit filter. Possible values are: NONE - auditing not configured for the project.m FILTER_BUILDER - auditing configured via Atlas UI filter builderm FILTER_JSON - auditing configured via Atlas custom filter or API.
    enabled Boolean
    Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String

    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 v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi