1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIamServiceId
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIamServiceId

Explore with Pulumi AI

Retrieve information about an IAM service ID. For more information, about IAM role action, see managing service ID API keys.

Example Usage

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

const dsServiceID = ibm.getIamServiceId({
    name: "sample",
});
Copy
import pulumi
import pulumi_ibm as ibm

ds_service_id = ibm.get_iam_service_id(name="sample")
Copy
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.LookupIamServiceId(ctx, &ibm.LookupIamServiceIdArgs{
			Name: "sample",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var dsServiceID = Ibm.GetIamServiceId.Invoke(new()
    {
        Name = "sample",
    });

});
Copy
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.GetIamServiceIdArgs;
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 dsServiceID = IbmFunctions.getIamServiceId(GetIamServiceIdArgs.builder()
            .name("sample")
            .build());

    }
}
Copy
variables:
  dsServiceID:
    fn::invoke:
      function: ibm:getIamServiceId
      arguments:
        name: sample
Copy

Using getIamServiceId

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 getIamServiceId(args: GetIamServiceIdArgs, opts?: InvokeOptions): Promise<GetIamServiceIdResult>
function getIamServiceIdOutput(args: GetIamServiceIdOutputArgs, opts?: InvokeOptions): Output<GetIamServiceIdResult>
Copy
def get_iam_service_id(id: Optional[str] = None,
                       name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetIamServiceIdResult
def get_iam_service_id_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetIamServiceIdResult]
Copy
func LookupIamServiceId(ctx *Context, args *LookupIamServiceIdArgs, opts ...InvokeOption) (*LookupIamServiceIdResult, error)
func LookupIamServiceIdOutput(ctx *Context, args *LookupIamServiceIdOutputArgs, opts ...InvokeOption) LookupIamServiceIdResultOutput
Copy

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

public static class GetIamServiceId 
{
    public static Task<GetIamServiceIdResult> InvokeAsync(GetIamServiceIdArgs args, InvokeOptions? opts = null)
    public static Output<GetIamServiceIdResult> Invoke(GetIamServiceIdInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIamServiceIdResult> getIamServiceId(GetIamServiceIdArgs args, InvokeOptions options)
public static Output<GetIamServiceIdResult> getIamServiceId(GetIamServiceIdArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIamServiceId:getIamServiceId
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the service ID.
Id string
(String) The unique identifier of the service ID.
Name This property is required. string
The name of the service ID.
Id string
(String) The unique identifier of the service ID.
name This property is required. String
The name of the service ID.
id String
(String) The unique identifier of the service ID.
name This property is required. string
The name of the service ID.
id string
(String) The unique identifier of the service ID.
name This property is required. str
The name of the service ID.
id str
(String) The unique identifier of the service ID.
name This property is required. String
The name of the service ID.
id String
(String) The unique identifier of the service ID.

getIamServiceId Result

The following output properties are available:

Id string
(String) The unique identifier of the service ID.
Name string
ServiceIds List<GetIamServiceIdServiceId>
(List of Objects) A nested block list of IAM service IDs.
Id string
(String) The unique identifier of the service ID.
Name string
ServiceIds []GetIamServiceIdServiceId
(List of Objects) A nested block list of IAM service IDs.
id String
(String) The unique identifier of the service ID.
name String
serviceIds List<GetIamServiceIdServiceId>
(List of Objects) A nested block list of IAM service IDs.
id string
(String) The unique identifier of the service ID.
name string
serviceIds GetIamServiceIdServiceId[]
(List of Objects) A nested block list of IAM service IDs.
id str
(String) The unique identifier of the service ID.
name str
service_ids Sequence[GetIamServiceIdServiceId]
(List of Objects) A nested block list of IAM service IDs.
id String
(String) The unique identifier of the service ID.
name String
serviceIds List<Property Map>
(List of Objects) A nested block list of IAM service IDs.

Supporting Types

GetIamServiceIdServiceId

BoundTo This property is required. string
(String) The service the service ID is bound to. This attribute is Deprecated.
Crn This property is required. string
(String) The CRN of the service ID.
Description This property is required. string
(String) A description of the service ID.
IamId This property is required. string
(String) The IAM ID of the service ID.
Id This property is required. string
(String) The unique identifier of the service ID.
Locked This property is required. bool
(Bool) If set to true, the service ID is locked.
Version This property is required. string
(String) The version of the service ID.
BoundTo This property is required. string
(String) The service the service ID is bound to. This attribute is Deprecated.
Crn This property is required. string
(String) The CRN of the service ID.
Description This property is required. string
(String) A description of the service ID.
IamId This property is required. string
(String) The IAM ID of the service ID.
Id This property is required. string
(String) The unique identifier of the service ID.
Locked This property is required. bool
(Bool) If set to true, the service ID is locked.
Version This property is required. string
(String) The version of the service ID.
boundTo This property is required. String
(String) The service the service ID is bound to. This attribute is Deprecated.
crn This property is required. String
(String) The CRN of the service ID.
description This property is required. String
(String) A description of the service ID.
iamId This property is required. String
(String) The IAM ID of the service ID.
id This property is required. String
(String) The unique identifier of the service ID.
locked This property is required. Boolean
(Bool) If set to true, the service ID is locked.
version This property is required. String
(String) The version of the service ID.
boundTo This property is required. string
(String) The service the service ID is bound to. This attribute is Deprecated.
crn This property is required. string
(String) The CRN of the service ID.
description This property is required. string
(String) A description of the service ID.
iamId This property is required. string
(String) The IAM ID of the service ID.
id This property is required. string
(String) The unique identifier of the service ID.
locked This property is required. boolean
(Bool) If set to true, the service ID is locked.
version This property is required. string
(String) The version of the service ID.
bound_to This property is required. str
(String) The service the service ID is bound to. This attribute is Deprecated.
crn This property is required. str
(String) The CRN of the service ID.
description This property is required. str
(String) A description of the service ID.
iam_id This property is required. str
(String) The IAM ID of the service ID.
id This property is required. str
(String) The unique identifier of the service ID.
locked This property is required. bool
(Bool) If set to true, the service ID is locked.
version This property is required. str
(String) The version of the service ID.
boundTo This property is required. String
(String) The service the service ID is bound to. This attribute is Deprecated.
crn This property is required. String
(String) The CRN of the service ID.
description This property is required. String
(String) A description of the service ID.
iamId This property is required. String
(String) The IAM ID of the service ID.
id This property is required. String
(String) The unique identifier of the service ID.
locked This property is required. Boolean
(Bool) If set to true, the service ID is locked.
version This property is required. String
(String) The version of the service ID.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.