1. Packages
  2. OVH
  3. API Docs
  4. Iam
  5. getResourceGroup
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

ovh.Iam.getResourceGroup

Explore with Pulumi AI

ovh logo
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 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",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    my_resource_group = ovh.Iam.get_resource_group(id="my_resource_group_id")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      myResourceGroup:
        fn::invoke:
          Function: ovh:Iam:getResourceGroup
          Arguments:
            id: my_resource_group_id
    

    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>
    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]
    func GetResourceGroup(ctx *Context, args *GetResourceGroupArgs, opts ...InvokeOption) (*GetResourceGroupResult, error)
    func GetResourceGroupOutput(ctx *Context, args *GetResourceGroupOutputArgs, opts ...InvokeOption) GetResourceGroupResultOutput

    > 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)
    }
    public static CompletableFuture<GetResourceGroupResult> getResourceGroup(GetResourceGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:Iam/getResourceGroup:getResourceGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Id of the resource group
    Id string
    Id of the resource group
    id String
    Id of the resource group
    id string
    Id of the resource group
    id str
    Id of the resource group
    id 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.
    ovh logo
    OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud