1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIamServiceId
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIamServiceId

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_service_id = ibm.get_iam_service_id(name="sample")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      dsServiceID:
        fn::invoke:
          function: ibm:getIamServiceId
          arguments:
            name: sample
    

    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>
    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]
    func LookupIamServiceId(ctx *Context, args *LookupIamServiceIdArgs, opts ...InvokeOption) (*LookupIamServiceIdResult, error)
    func LookupIamServiceIdOutput(ctx *Context, args *LookupIamServiceIdOutputArgs, opts ...InvokeOption) LookupIamServiceIdResultOutput

    > 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)
    }
    public static CompletableFuture<GetIamServiceIdResult> getIamServiceId(GetIamServiceIdArgs args, InvokeOptions options)
    public static Output<GetIamServiceIdResult> getIamServiceId(GetIamServiceIdArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIamServiceId:getIamServiceId
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the service ID.
    Id string
    (String) The unique identifier of the service ID.
    Name string
    The name of the service ID.
    Id string
    (String) The unique identifier of the service ID.
    name String
    The name of the service ID.
    id String
    (String) The unique identifier of the service ID.
    name string
    The name of the service ID.
    id string
    (String) The unique identifier of the service ID.
    name str
    The name of the service ID.
    id str
    (String) The unique identifier of the service ID.
    name 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 string
    (String) The service the service ID is bound to. This attribute is Deprecated.
    Crn string
    (String) The CRN of the service ID.
    Description string
    (String) A description of the service ID.
    IamId string
    (String) The IAM ID of the service ID.
    Id string
    (String) The unique identifier of the service ID.
    Locked bool
    (Bool) If set to true, the service ID is locked.
    Version string
    (String) The version of the service ID.
    BoundTo string
    (String) The service the service ID is bound to. This attribute is Deprecated.
    Crn string
    (String) The CRN of the service ID.
    Description string
    (String) A description of the service ID.
    IamId string
    (String) The IAM ID of the service ID.
    Id string
    (String) The unique identifier of the service ID.
    Locked bool
    (Bool) If set to true, the service ID is locked.
    Version string
    (String) The version of the service ID.
    boundTo String
    (String) The service the service ID is bound to. This attribute is Deprecated.
    crn String
    (String) The CRN of the service ID.
    description String
    (String) A description of the service ID.
    iamId String
    (String) The IAM ID of the service ID.
    id String
    (String) The unique identifier of the service ID.
    locked Boolean
    (Bool) If set to true, the service ID is locked.
    version String
    (String) The version of the service ID.
    boundTo string
    (String) The service the service ID is bound to. This attribute is Deprecated.
    crn string
    (String) The CRN of the service ID.
    description string
    (String) A description of the service ID.
    iamId string
    (String) The IAM ID of the service ID.
    id string
    (String) The unique identifier of the service ID.
    locked boolean
    (Bool) If set to true, the service ID is locked.
    version string
    (String) The version of the service ID.
    bound_to str
    (String) The service the service ID is bound to. This attribute is Deprecated.
    crn str
    (String) The CRN of the service ID.
    description str
    (String) A description of the service ID.
    iam_id str
    (String) The IAM ID of the service ID.
    id str
    (String) The unique identifier of the service ID.
    locked bool
    (Bool) If set to true, the service ID is locked.
    version str
    (String) The version of the service ID.
    boundTo String
    (String) The service the service ID is bound to. This attribute is Deprecated.
    crn String
    (String) The CRN of the service ID.
    description String
    (String) A description of the service ID.
    iamId String
    (String) The IAM ID of the service ID.
    id String
    (String) The unique identifier of the service ID.
    locked Boolean
    (Bool) If set to true, the service ID is locked.
    version 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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud