1. Packages
  2. Scaleway
  3. API Docs
  4. iam
  5. getGroup
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.iam.getGroup

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

Gets information about an existing IAM group.

For more information, refer to the IAM API documentation

Example Usage

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

// Get info by name
const findByName = scaleway.iam.getGroup({
    name: "foobar",
});
// Get info by group ID
const findById = scaleway.iam.getGroup({
    groupId: "11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get info by name
find_by_name = scaleway.iam.get_group(name="foobar")
# Get info by group ID
find_by_id = scaleway.iam.get_group(group_id="11111111-1111-1111-1111-111111111111")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by name
		_, err := iam.LookupGroup(ctx, &iam.LookupGroupArgs{
			Name: pulumi.StringRef("foobar"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by group ID
		_, err = iam.LookupGroup(ctx, &iam.LookupGroupArgs{
			GroupId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    // Get info by name
    var findByName = Scaleway.Iam.GetGroup.Invoke(new()
    {
        Name = "foobar",
    });

    // Get info by group ID
    var findById = Scaleway.Iam.GetGroup.Invoke(new()
    {
        GroupId = "11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetGroupArgs;
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) {
        // Get info by name
        final var findByName = IamFunctions.getGroup(GetGroupArgs.builder()
            .name("foobar")
            .build());

        // Get info by group ID
        final var findById = IamFunctions.getGroup(GetGroupArgs.builder()
            .groupId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  # Get info by name
  findByName:
    fn::invoke:
      function: scaleway:iam:getGroup
      arguments:
        name: foobar
  # Get info by group ID
  findById:
    fn::invoke:
      function: scaleway:iam:getGroup
      arguments:
        groupId: 11111111-1111-1111-1111-111111111111
Copy

Using getGroup

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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
Copy
def get_group(group_id: Optional[str] = None,
              name: Optional[str] = None,
              organization_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(group_id: Optional[pulumi.Input[str]] = None,
              name: Optional[pulumi.Input[str]] = None,
              organization_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
Copy
func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput
Copy

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

public static class GetGroup 
{
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:iam/getGroup:getGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

GroupId string

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

Name string
The name of the IAM group.
OrganizationId string
organization_id) The ID of the organization the group is associated with.
GroupId string

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

Name string
The name of the IAM group.
OrganizationId string
organization_id) The ID of the organization the group is associated with.
groupId String

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

name String
The name of the IAM group.
organizationId String
organization_id) The ID of the organization the group is associated with.
groupId string

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

name string
The name of the IAM group.
organizationId string
organization_id) The ID of the organization the group is associated with.
group_id str

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

name str
The name of the IAM group.
organization_id str
organization_id) The ID of the organization the group is associated with.
groupId String

The ID of the IAM group.

Note You must specify at least one: name and/or group_id.

name String
The name of the IAM group.
organizationId String
organization_id) The ID of the organization the group is associated with.

getGroup Result

The following output properties are available:

ApplicationIds List<string>
CreatedAt string
Description string
ExternalMembership bool
Id string
The provider-assigned unique ID for this managed resource.
Tags List<string>
UpdatedAt string
UserIds List<string>
GroupId string
Name string
OrganizationId string
ApplicationIds []string
CreatedAt string
Description string
ExternalMembership bool
Id string
The provider-assigned unique ID for this managed resource.
Tags []string
UpdatedAt string
UserIds []string
GroupId string
Name string
OrganizationId string
applicationIds List<String>
createdAt String
description String
externalMembership Boolean
id String
The provider-assigned unique ID for this managed resource.
tags List<String>
updatedAt String
userIds List<String>
groupId String
name String
organizationId String
applicationIds string[]
createdAt string
description string
externalMembership boolean
id string
The provider-assigned unique ID for this managed resource.
tags string[]
updatedAt string
userIds string[]
groupId string
name string
organizationId string
application_ids Sequence[str]
created_at str
description str
external_membership bool
id str
The provider-assigned unique ID for this managed resource.
tags Sequence[str]
updated_at str
user_ids Sequence[str]
group_id str
name str
organization_id str
applicationIds List<String>
createdAt String
description String
externalMembership Boolean
id String
The provider-assigned unique ID for this managed resource.
tags List<String>
updatedAt String
userIds List<String>
groupId String
name String
organizationId String

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse