dynatrace.getIamGroup
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
).
The IAM group data source allows the group ID to be retrieved by its name.
name
(String) - The name of the IAM group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumi/dynatrace";
const example = dynatrace.getIamGroup({
name: "Terraform Example",
});
export const groups = example.then(example => example.id);
import pulumi
import pulumi_dynatrace as dynatrace
example = dynatrace.get_iam_group(name="Terraform Example")
pulumi.export("groups", example.id)
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 {
example, err := dynatrace.LookupIamGroup(ctx, &dynatrace.LookupIamGroupArgs{
Name: "Terraform Example",
}, nil)
if err != nil {
return err
}
ctx.Export("groups", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;
return await Deployment.RunAsync(() =>
{
var example = Dynatrace.GetIamGroup.Invoke(new()
{
Name = "Terraform Example",
});
return new Dictionary<string, object?>
{
["groups"] = example.Apply(getIamGroupResult => getIamGroupResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.DynatraceFunctions;
import com.pulumi.dynatrace.inputs.GetIamGroupArgs;
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 example = DynatraceFunctions.getIamGroup(GetIamGroupArgs.builder()
.name("Terraform Example")
.build());
ctx.export("groups", example.applyValue(getIamGroupResult -> getIamGroupResult.id()));
}
}
variables:
example:
fn::invoke:
Function: dynatrace:getIamGroup
Arguments:
name: Terraform Example
outputs:
groups: ${example.id}
Using getIamGroup
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 getIamGroup(args: GetIamGroupArgs, opts?: InvokeOptions): Promise<GetIamGroupResult>
function getIamGroupOutput(args: GetIamGroupOutputArgs, opts?: InvokeOptions): Output<GetIamGroupResult>
def get_iam_group(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamGroupResult
def get_iam_group_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamGroupResult]
func LookupIamGroup(ctx *Context, args *LookupIamGroupArgs, opts ...InvokeOption) (*LookupIamGroupResult, error)
func LookupIamGroupOutput(ctx *Context, args *LookupIamGroupOutputArgs, opts ...InvokeOption) LookupIamGroupResultOutput
> Note: This function is named LookupIamGroup
in the Go SDK.
public static class GetIamGroup
{
public static Task<GetIamGroupResult> InvokeAsync(GetIamGroupArgs args, InvokeOptions? opts = null)
public static Output<GetIamGroupResult> Invoke(GetIamGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamGroupResult> getIamGroup(GetIamGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: dynatrace:index/getIamGroup:getIamGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name string
- name String
- name string
- name str
- name String
getIamGroup 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.