1. Packages
  2. OVH
  3. API Docs
  4. Iam
  5. getResourceGroup
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

ovh.Iam.getResourceGroup

Explore with Pulumi AI

OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud

Use this data source get details about a resource group.

Example Usage

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

const myResourceGroup = ovh.Iam.getResourceGroup({
    id: "my_resource_group_id",
});
Copy
import pulumi
import pulumi_ovh as ovh

my_resource_group = ovh.Iam.get_resource_group(id="my_resource_group_id")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.GetResourceGroup(ctx, &iam.GetResourceGroupArgs{
			Id: "my_resource_group_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var myResourceGroup = Ovh.Iam.GetResourceGroup.Invoke(new()
    {
        Id = "my_resource_group_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Iam.IamFunctions;
import com.pulumi.ovh.Iam.inputs.GetResourceGroupArgs;
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 myResourceGroup = IamFunctions.getResourceGroup(GetResourceGroupArgs.builder()
            .id("my_resource_group_id")
            .build());

    }
}
Copy
variables:
  myResourceGroup:
    fn::invoke:
      function: ovh:Iam:getResourceGroup
      arguments:
        id: my_resource_group_id
Copy

Using getResourceGroup

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 getResourceGroup(args: GetResourceGroupArgs, opts?: InvokeOptions): Promise<GetResourceGroupResult>
function getResourceGroupOutput(args: GetResourceGroupOutputArgs, opts?: InvokeOptions): Output<GetResourceGroupResult>
Copy
def get_resource_group(id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetResourceGroupResult
def get_resource_group_output(id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetResourceGroupResult]
Copy
func GetResourceGroup(ctx *Context, args *GetResourceGroupArgs, opts ...InvokeOption) (*GetResourceGroupResult, error)
func GetResourceGroupOutput(ctx *Context, args *GetResourceGroupOutputArgs, opts ...InvokeOption) GetResourceGroupResultOutput
Copy

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

public static class GetResourceGroup 
{
    public static Task<GetResourceGroupResult> InvokeAsync(GetResourceGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetResourceGroupResult> Invoke(GetResourceGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetResourceGroupResult> getResourceGroup(GetResourceGroupArgs args, InvokeOptions options)
public static Output<GetResourceGroupResult> getResourceGroup(GetResourceGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:Iam/getResourceGroup:getResourceGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
Id of the resource group
Id This property is required. string
Id of the resource group
id This property is required. String
Id of the resource group
id This property is required. string
Id of the resource group
id This property is required. str
Id of the resource group
id This property is required. String
Id of the resource group

getResourceGroup Result

The following output properties are available:

CreatedAt string
Date of the creation of the resource group
GroupURN string
URN of the resource group, used when writing policies
Id string
Name string
Name of the resource group
Owner string
Name of the account owning the resource group
ReadOnly bool
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
Resources List<string>
Set of the URNs of the resources contained in the resource group
UpdatedAt string
Date of the last modification of the resource group
CreatedAt string
Date of the creation of the resource group
GroupURN string
URN of the resource group, used when writing policies
Id string
Name string
Name of the resource group
Owner string
Name of the account owning the resource group
ReadOnly bool
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
Resources []string
Set of the URNs of the resources contained in the resource group
UpdatedAt string
Date of the last modification of the resource group
GroupURN String
URN of the resource group, used when writing policies
createdAt String
Date of the creation of the resource group
id String
name String
Name of the resource group
owner String
Name of the account owning the resource group
readOnly Boolean
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
resources List<String>
Set of the URNs of the resources contained in the resource group
updatedAt String
Date of the last modification of the resource group
GroupURN string
URN of the resource group, used when writing policies
createdAt string
Date of the creation of the resource group
id string
name string
Name of the resource group
owner string
Name of the account owning the resource group
readOnly boolean
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
resources string[]
Set of the URNs of the resources contained in the resource group
updatedAt string
Date of the last modification of the resource group
created_at str
Date of the creation of the resource group
group_urn str
URN of the resource group, used when writing policies
id str
name str
Name of the resource group
owner str
Name of the account owning the resource group
read_only bool
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
resources Sequence[str]
Set of the URNs of the resources contained in the resource group
updated_at str
Date of the last modification of the resource group
GroupURN String
URN of the resource group, used when writing policies
createdAt String
Date of the creation of the resource group
id String
name String
Name of the resource group
owner String
Name of the account owning the resource group
readOnly Boolean
Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
resources List<String>
Set of the URNs of the resources contained in the resource group
updatedAt String
Date of the last modification of the resource group

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.0 published on Friday, Mar 28, 2025 by OVHcloud