ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getIamRoles
Explore with Pulumi AI
Retrieve information about supported IAM roles for an IBM Cloud service. For more information, about IAM role action, see actions and roles for account management services.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const test = ibm.getIamRoles({
service: "kms",
});
import pulumi
import pulumi_ibm as ibm
test = ibm.get_iam_roles(service="kms")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetIamRoles(ctx, &ibm.GetIamRolesArgs{
Service: pulumi.StringRef("kms"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var test = Ibm.GetIamRoles.Invoke(new()
{
Service = "kms",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIamRolesArgs;
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 test = IbmFunctions.getIamRoles(GetIamRolesArgs.builder()
.service("kms")
.build());
}
}
variables:
test:
fn::invoke:
function: ibm:getIamRoles
arguments:
service: kms
Using getIamRoles
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 getIamRoles(args: GetIamRolesArgs, opts?: InvokeOptions): Promise<GetIamRolesResult>
function getIamRolesOutput(args: GetIamRolesOutputArgs, opts?: InvokeOptions): Output<GetIamRolesResult>
def get_iam_roles(id: Optional[str] = None,
service: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamRolesResult
def get_iam_roles_output(id: Optional[pulumi.Input[str]] = None,
service: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamRolesResult]
func GetIamRoles(ctx *Context, args *GetIamRolesArgs, opts ...InvokeOption) (*GetIamRolesResult, error)
func GetIamRolesOutput(ctx *Context, args *GetIamRolesOutputArgs, opts ...InvokeOption) GetIamRolesResultOutput
> Note: This function is named GetIamRoles
in the Go SDK.
public static class GetIamRoles
{
public static Task<GetIamRolesResult> InvokeAsync(GetIamRolesArgs args, InvokeOptions? opts = null)
public static Output<GetIamRolesResult> Invoke(GetIamRolesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamRolesResult> getIamRoles(GetIamRolesArgs args, InvokeOptions options)
public static Output<GetIamRolesResult> getIamRoles(GetIamRolesArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIamRoles:getIamRoles
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- (String) The ID of your IBM Cloud account.
- Service string
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
- Id string
- (String) The ID of your IBM Cloud account.
- Service string
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
- id String
- (String) The ID of your IBM Cloud account.
- service String
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
- id string
- (String) The ID of your IBM Cloud account.
- service string
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
- id str
- (String) The ID of your IBM Cloud account.
- service str
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
- id String
- (String) The ID of your IBM Cloud account.
- service String
- The name of the IBM Cloud service for which you want to list supported IAM For account management services, you can find supported values in the documentation. For other services, run the
ibmcloud catalog service-marketplace
command and retrieve the value from the Name column of your command line output.
getIamRoles Result
The following output properties are available:
- Id string
- (String) The ID of your IBM Cloud account.
- Roles
List<Get
Iam Roles Role> - (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- Service string
- Id string
- (String) The ID of your IBM Cloud account.
- Roles
[]Get
Iam Roles Role - (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- Service string
- id String
- (String) The ID of your IBM Cloud account.
- roles
List<Get
Iam Roles Role> - (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- service String
- id string
- (String) The ID of your IBM Cloud account.
- roles
Get
Iam Roles Role[] - (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- service string
- id str
- (String) The ID of your IBM Cloud account.
- roles
Sequence[Get
Iam Roles Role] - (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- service str
- id String
- (String) The ID of your IBM Cloud account.
- roles List<Property Map>
- (List) A list of supported IAM service access, platform, and custom roles for an IBM Cloud service.
- service String
Supporting Types
GetIamRolesRole
- Description string
- (String) The description of the role.
- Name string
- (String) The name of the role.
- Type string
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
- Description string
- (String) The description of the role.
- Name string
- (String) The name of the role.
- Type string
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
- description String
- (String) The description of the role.
- name String
- (String) The name of the role.
- type String
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
- description string
- (String) The description of the role.
- name string
- (String) The name of the role.
- type string
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
- description str
- (String) The description of the role.
- name str
- (String) The name of the role.
- type str
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
- description String
- (String) The description of the role.
- name String
- (String) The name of the role.
- type String
- (String) The type of the role. Supported values are
service
,platform
, andcustom
.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.