1. Packages
  2. Aquasec
  3. API Docs
  4. getGroups
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

aquasec.getGroups

Explore with Pulumi AI

Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

The data source aquasec.getGroups provides a method to query all groups within the Aqua CSPMgroup database. The fields returned from this query are detailed in the Schema section below.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aquasec from "@pulumi/aquasec";

const groups = aquasec.getGroups({});
export const firstGroupName = groups.then(groups => groups.groups?.[0]?.name);
Copy
import pulumi
import pulumi_aquasec as aquasec

groups = aquasec.get_groups()
pulumi.export("firstGroupName", groups.groups[0].name)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		groups, err := aquasec.GetGroups(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstGroupName", groups.Groups[0].Name)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aquasec = Pulumi.Aquasec;

return await Deployment.RunAsync(() => 
{
    var groups = Aquasec.GetGroups.Invoke();

    return new Dictionary<string, object?>
    {
        ["firstGroupName"] = groups.Apply(getGroupsResult => getGroupsResult.Groups[0]?.Name),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aquasec.AquasecFunctions;
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 groups = AquasecFunctions.getGroups();

        ctx.export("firstGroupName", groups.applyValue(getGroupsResult -> getGroupsResult.groups()[0].name()));
    }
}
Copy
variables:
  groups:
    fn::invoke:
      Function: aquasec:getGroups
      Arguments: {}
outputs:
  firstGroupName: ${groups.groups[0].name}
Copy

Using getGroups

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 getGroups(opts?: InvokeOptions): Promise<GetGroupsResult>
function getGroupsOutput(opts?: InvokeOptions): Output<GetGroupsResult>
Copy
def get_groups(opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]
Copy
func GetGroups(ctx *Context, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, opts ...InvokeOption) GetGroupsResultOutput
Copy

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

public static class GetGroups 
{
    public static Task<GetGroupsResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetGroupsResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGroupsResult> getGroups(InvokeOptions options)
public static Output<GetGroupsResult> getGroups(InvokeOptions options)
Copy
fn::invoke:
  function: aquasec:index/getGroups:getGroups
  arguments:
    # arguments dictionary
Copy

getGroups Result

The following output properties are available:

Groups List<Pulumiverse.Aquasec.Outputs.GetGroupsGroup>
Id string
The provider-assigned unique ID for this managed resource.
Groups []GetGroupsGroup
Id string
The provider-assigned unique ID for this managed resource.
groups List<GetGroupsGroup>
id String
The provider-assigned unique ID for this managed resource.
groups GetGroupsGroup[]
id string
The provider-assigned unique ID for this managed resource.
groups Sequence[GetGroupsGroup]
id str
The provider-assigned unique ID for this managed resource.
groups List<Property Map>
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

GetGroupsGroup

Created This property is required. string
The creation date of the group.
GroupId This property is required. string
The ID of the created group.
Name This property is required. string
The desired name of the group.
Created This property is required. string
The creation date of the group.
GroupId This property is required. string
The ID of the created group.
Name This property is required. string
The desired name of the group.
created This property is required. String
The creation date of the group.
groupId This property is required. String
The ID of the created group.
name This property is required. String
The desired name of the group.
created This property is required. string
The creation date of the group.
groupId This property is required. string
The ID of the created group.
name This property is required. string
The desired name of the group.
created This property is required. str
The creation date of the group.
group_id This property is required. str
The ID of the created group.
name This property is required. str
The desired name of the group.
created This property is required. String
The creation date of the group.
groupId This property is required. String
The ID of the created group.
name This property is required. String
The desired name of the group.

Package Details

Repository
aquasec pulumiverse/pulumi-aquasec
License
Apache-2.0
Notes
This Pulumi package is based on the aquasec Terraform Provider.
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse