Skip to content

Update apis for group audit events

What does this MR do and why?

Added update api for consolidated group level external audit event streaming destinations. Create api for the same was added in !147888 (merged).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Follow steps in !147888 (merged) for creating and fetching the list of destinations for a group.
  2. Run following mutation to update a destination, it should update the destination and not return any errors.
mutation groupAuditEventStreamingDestinationsUpdate{
  groupAuditEventStreamingDestinationsUpdate(input: {
    id:"gid://gitlab/AuditEvents::Group::ExternalStreamingDestination/2",
    config: {
      bucket: "some-bucket",
      awsRegion: "us-east-1",
      accessKeyID: "someRandomKey"
    },
    category: "aws",
    secretToken: "aws-random-token"
  } ) {
    errors
    externalAuditEventDestination {
      id
      name
      config
      category
    }
  }
}
  1. You can list the destinations for the group for verifying whether the information got updated or not by running following query
query groupDestinations {
  group(fullPath: "twitter") {
    id
    name
    externalAuditEventStreamingDestinations {
      nodes {
        id
        name
        category
        config
      }
    }
  }
}

Related to #436610 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports