OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud
ovh.Iam.getResourceGroups
Explore with Pulumi AI
Use this data source to list the existing IAM policies of an account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const myGroups = ovh.Iam.getResourceGroups({});
import pulumi
import pulumi_ovh as ovh
my_groups = ovh.Iam.get_resource_groups()
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.GetResourceGroups(ctx, map[string]interface{}{}, 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 myGroups = Ovh.Iam.GetResourceGroups.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Iam.IamFunctions;
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 myGroups = IamFunctions.getResourceGroups();
}
}
variables:
myGroups:
fn::invoke:
Function: ovh:Iam:getResourceGroups
Arguments: {}
Using getResourceGroups
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 getResourceGroups(opts?: InvokeOptions): Promise<GetResourceGroupsResult>
function getResourceGroupsOutput(opts?: InvokeOptions): Output<GetResourceGroupsResult>
def get_resource_groups(opts: Optional[InvokeOptions] = None) -> GetResourceGroupsResult
def get_resource_groups_output(opts: Optional[InvokeOptions] = None) -> Output[GetResourceGroupsResult]
func GetResourceGroups(ctx *Context, opts ...InvokeOption) (*GetResourceGroupsResult, error)
func GetResourceGroupsOutput(ctx *Context, opts ...InvokeOption) GetResourceGroupsResultOutput
> Note: This function is named GetResourceGroups
in the Go SDK.
public static class GetResourceGroups
{
public static Task<GetResourceGroupsResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetResourceGroupsResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceGroupsResult> getResourceGroups(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:Iam/getResourceGroups:getResourceGroups
arguments:
# arguments dictionary
getResourceGroups Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Groups List<string> - List of the resource groups IDs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Groups []string - List of the resource groups IDs.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Groups List<String> - List of the resource groups IDs.
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Groups string[] - List of the resource groups IDs.
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
groups Sequence[str] - List of the resource groups IDs.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Groups List<String> - List of the resource groups IDs.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.