OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud
ovh.Iam.getPolicies
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 myPolicies = ovh.Iam.getPolicies({});
import pulumi
import pulumi_ovh as ovh
my_policies = ovh.Iam.get_policies()
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.GetPolicies(ctx, nil, 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 myPolicies = Ovh.Iam.GetPolicies.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 myPolicies = IamFunctions.getPolicies();
}
}
variables:
myPolicies:
fn::invoke:
Function: ovh:Iam:getPolicies
Arguments: {}
Using getPolicies
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 getPolicies(opts?: InvokeOptions): Promise<GetPoliciesResult>
function getPoliciesOutput(opts?: InvokeOptions): Output<GetPoliciesResult>
def get_policies(opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
def get_policies_output(opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]
func GetPolicies(ctx *Context, opts ...InvokeOption) (*GetPoliciesResult, error)
func GetPoliciesOutput(ctx *Context, opts ...InvokeOption) GetPoliciesResultOutput
> Note: This function is named GetPolicies
in the Go SDK.
public static class GetPolicies
{
public static Task<GetPoliciesResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetPoliciesResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetPoliciesResult> getPolicies(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:Iam/getPolicies:getPolicies
arguments:
# arguments dictionary
getPolicies Result
The following output properties are available:
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.