Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse
dynatrace.getIamGroups
Explore with Pulumi AI
Dynatrace SaaS only
To utilize this resource, please define the environment variables
DT_CLIENT_ID
,DT_CLIENT_SECRET
,DT_ACCOUNT_ID
with an OAuth client including the following permission: Allow read access for identity resources (users and groups) (account-idm-read
).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumi/dynatrace";
const all-groups = dynatrace.getIamGroups({});
export const groups = all_groups;
import pulumi
import pulumi_dynatrace as dynatrace
all_groups = dynatrace.get_iam_groups()
pulumi.export("groups", all_groups)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all_groups, err := dynatrace.GetIamGroups(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("groups", all_groups)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;
return await Deployment.RunAsync(() =>
{
var all_groups = Dynatrace.GetIamGroups.Invoke();
return new Dictionary<string, object?>
{
["groups"] = all_groups,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.DynatraceFunctions;
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 all-groups = DynatraceFunctions.getIamGroups();
ctx.export("groups", all_groups);
}
}
variables:
all-groups:
fn::invoke:
Function: dynatrace:getIamGroups
Arguments: {}
outputs:
groups: ${["all-groups"]}
Example output
Changes to Outputs:
+ groups = {
+ groups = {
+ "########-3036-3ac2-5fa4-############" = "Group A"
+ "########-4049-4241-ac2b-############" = "Group B"
+ "########-5365-4450-89ab-############" = "Group C"
}
+ id = "iam-groups"
}
Using getIamGroups
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 getIamGroups(opts?: InvokeOptions): Promise<GetIamGroupsResult>
function getIamGroupsOutput(opts?: InvokeOptions): Output<GetIamGroupsResult>
def get_iam_groups(opts: Optional[InvokeOptions] = None) -> GetIamGroupsResult
def get_iam_groups_output(opts: Optional[InvokeOptions] = None) -> Output[GetIamGroupsResult]
func GetIamGroups(ctx *Context, opts ...InvokeOption) (*GetIamGroupsResult, error)
func GetIamGroupsOutput(ctx *Context, opts ...InvokeOption) GetIamGroupsResultOutput
> Note: This function is named GetIamGroups
in the Go SDK.
public static class GetIamGroups
{
public static Task<GetIamGroupsResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetIamGroupsResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamGroupsResult> getIamGroups(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: dynatrace:index/getIamGroups:getIamGroups
arguments:
# arguments dictionary
getIamGroups Result
The following output properties are available:
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatrace
Terraform Provider.