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

ibm.getKmsKmipAdapter

Explore with Pulumi AI

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

    Example Usage

    Sample example to retrieve a KMIP adapter as a data source.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const kmsInstance = new ibm.ResourceInstance("kmsInstance", {
        service: "kms",
        plan: "tiered-pricing",
        location: "us-south",
    });
    const myadapter = new ibm.KmsKmipAdapter("myadapter", {
        instanceId: kmsInstance.guid,
        profile: "native_1.0",
        profileData: {
            crk_id: ibm_kms_key.key.key_id,
        },
        description: "adding a description",
    });
    const myadapterByname = ibm.getKmsKmipAdapterOutput({
        instanceId: kmsInstance.guid,
        name: myadapter.name,
    });
    const myadapterByid = ibm.getKmsKmipAdapterOutput({
        instanceId: kmsInstance.guid,
        adapterId: myadapter.adapterId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    kms_instance = ibm.ResourceInstance("kmsInstance",
        service="kms",
        plan="tiered-pricing",
        location="us-south")
    myadapter = ibm.KmsKmipAdapter("myadapter",
        instance_id=kms_instance.guid,
        profile="native_1.0",
        profile_data={
            "crk_id": ibm_kms_key["key"]["key_id"],
        },
        description="adding a description")
    myadapter_byname = ibm.get_kms_kmip_adapter_output(instance_id=kms_instance.guid,
        name=myadapter.name)
    myadapter_byid = ibm.get_kms_kmip_adapter_output(instance_id=kms_instance.guid,
        adapter_id=myadapter.adapter_id)
    
    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 {
    		kmsInstance, err := ibm.NewResourceInstance(ctx, "kmsInstance", &ibm.ResourceInstanceArgs{
    			Service:  pulumi.String("kms"),
    			Plan:     pulumi.String("tiered-pricing"),
    			Location: pulumi.String("us-south"),
    		})
    		if err != nil {
    			return err
    		}
    		myadapter, err := ibm.NewKmsKmipAdapter(ctx, "myadapter", &ibm.KmsKmipAdapterArgs{
    			InstanceId: kmsInstance.Guid,
    			Profile:    pulumi.String("native_1.0"),
    			ProfileData: pulumi.StringMap{
    				"crk_id": pulumi.Any(ibm_kms_key.Key.Key_id),
    			},
    			Description: pulumi.String("adding a description"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = ibm.LookupKmsKmipAdapterOutput(ctx, ibm.GetKmsKmipAdapterOutputArgs{
    			InstanceId: kmsInstance.Guid,
    			Name:       myadapter.Name,
    		}, nil)
    		_ = ibm.LookupKmsKmipAdapterOutput(ctx, ibm.GetKmsKmipAdapterOutputArgs{
    			InstanceId: kmsInstance.Guid,
    			AdapterId:  myadapter.AdapterId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var kmsInstance = new Ibm.ResourceInstance("kmsInstance", new()
        {
            Service = "kms",
            Plan = "tiered-pricing",
            Location = "us-south",
        });
    
        var myadapter = new Ibm.KmsKmipAdapter("myadapter", new()
        {
            InstanceId = kmsInstance.Guid,
            Profile = "native_1.0",
            ProfileData = 
            {
                { "crk_id", ibm_kms_key.Key.Key_id },
            },
            Description = "adding a description",
        });
    
        var myadapterByname = Ibm.GetKmsKmipAdapter.Invoke(new()
        {
            InstanceId = kmsInstance.Guid,
            Name = myadapter.Name,
        });
    
        var myadapterByid = Ibm.GetKmsKmipAdapter.Invoke(new()
        {
            InstanceId = kmsInstance.Guid,
            AdapterId = myadapter.AdapterId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.ResourceInstance;
    import com.pulumi.ibm.ResourceInstanceArgs;
    import com.pulumi.ibm.KmsKmipAdapter;
    import com.pulumi.ibm.KmsKmipAdapterArgs;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetKmsKmipAdapterArgs;
    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) {
            var kmsInstance = new ResourceInstance("kmsInstance", ResourceInstanceArgs.builder()
                .service("kms")
                .plan("tiered-pricing")
                .location("us-south")
                .build());
    
            var myadapter = new KmsKmipAdapter("myadapter", KmsKmipAdapterArgs.builder()
                .instanceId(kmsInstance.guid())
                .profile("native_1.0")
                .profileData(Map.of("crk_id", ibm_kms_key.key().key_id()))
                .description("adding a description")
                .build());
    
            final var myadapterByname = IbmFunctions.getKmsKmipAdapter(GetKmsKmipAdapterArgs.builder()
                .instanceId(kmsInstance.guid())
                .name(myadapter.name())
                .build());
    
            final var myadapterByid = IbmFunctions.getKmsKmipAdapter(GetKmsKmipAdapterArgs.builder()
                .instanceId(kmsInstance.guid())
                .adapterId(myadapter.adapterId())
                .build());
    
        }
    }
    
    resources:
      kmsInstance:
        type: ibm:ResourceInstance
        properties:
          service: kms
          plan: tiered-pricing
          location: us-south
      myadapter:
        type: ibm:KmsKmipAdapter
        properties:
          instanceId: ${kmsInstance.guid}
          profile: native_1.0
          profileData:
            crk_id: ${ibm_kms_key.key.key_id}
          description: adding a description
    variables:
      myadapterByname:
        fn::invoke:
          function: ibm:getKmsKmipAdapter
          arguments:
            instanceId: ${kmsInstance.guid}
            name: ${myadapter.name}
      myadapterByid:
        fn::invoke:
          function: ibm:getKmsKmipAdapter
          arguments:
            instanceId: ${kmsInstance.guid}
            adapterId: ${myadapter.adapterId}
    

    Using getKmsKmipAdapter

    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 getKmsKmipAdapter(args: GetKmsKmipAdapterArgs, opts?: InvokeOptions): Promise<GetKmsKmipAdapterResult>
    function getKmsKmipAdapterOutput(args: GetKmsKmipAdapterOutputArgs, opts?: InvokeOptions): Output<GetKmsKmipAdapterResult>
    def get_kms_kmip_adapter(adapter_id: Optional[str] = None,
                             endpoint_type: Optional[str] = None,
                             id: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetKmsKmipAdapterResult
    def get_kms_kmip_adapter_output(adapter_id: Optional[pulumi.Input[str]] = None,
                             endpoint_type: Optional[pulumi.Input[str]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             instance_id: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetKmsKmipAdapterResult]
    func LookupKmsKmipAdapter(ctx *Context, args *LookupKmsKmipAdapterArgs, opts ...InvokeOption) (*LookupKmsKmipAdapterResult, error)
    func LookupKmsKmipAdapterOutput(ctx *Context, args *LookupKmsKmipAdapterOutputArgs, opts ...InvokeOption) LookupKmsKmipAdapterResultOutput

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

    public static class GetKmsKmipAdapter 
    {
        public static Task<GetKmsKmipAdapterResult> InvokeAsync(GetKmsKmipAdapterArgs args, InvokeOptions? opts = null)
        public static Output<GetKmsKmipAdapterResult> Invoke(GetKmsKmipAdapterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKmsKmipAdapterResult> getKmsKmipAdapter(GetKmsKmipAdapterArgs args, InvokeOptions options)
    public static Output<GetKmsKmipAdapterResult> getKmsKmipAdapter(GetKmsKmipAdapterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getKmsKmipAdapter:getKmsKmipAdapter
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The key protect instance GUID.
    AdapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    EndpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    Id string
    Name string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    InstanceId string
    The key protect instance GUID.
    AdapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    EndpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    Id string
    Name string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    instanceId String
    The key protect instance GUID.
    adapterId String
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    endpointType String
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id String
    name String
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    instanceId string
    The key protect instance GUID.
    adapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    endpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id string
    name string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    instance_id str
    The key protect instance GUID.
    adapter_id str
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    endpoint_type str
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id str
    name str
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    instanceId String
    The key protect instance GUID.
    adapterId String
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with name. One has to be given.
    endpointType String
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id String
    name String
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.

    getKmsKmipAdapter Result

    The following output properties are available:

    AdapterId string
    CreatedAt string
    (String) The date the resource was created, in RFC 3339 format
    CreatedBy string
    (String) The IBM-ID of the identity that created the resource
    Description string
    (String) The description of the KMIP adapter.
    EndpointType string
    Id string
    InstanceId string
    Name string
    Profile string
    (String) The profile of the KMIP adapter.
    ProfileData Dictionary<string, string>
    (Map) The profile data of the KMIP adapter.
    UpdatedAt string
    (String) The date the resource was updated, in RFC 3339 format
    UpdatedBy string
    (String) The IBM-ID of the identity that updated the resource
    AdapterId string
    CreatedAt string
    (String) The date the resource was created, in RFC 3339 format
    CreatedBy string
    (String) The IBM-ID of the identity that created the resource
    Description string
    (String) The description of the KMIP adapter.
    EndpointType string
    Id string
    InstanceId string
    Name string
    Profile string
    (String) The profile of the KMIP adapter.
    ProfileData map[string]string
    (Map) The profile data of the KMIP adapter.
    UpdatedAt string
    (String) The date the resource was updated, in RFC 3339 format
    UpdatedBy string
    (String) The IBM-ID of the identity that updated the resource
    adapterId String
    createdAt String
    (String) The date the resource was created, in RFC 3339 format
    createdBy String
    (String) The IBM-ID of the identity that created the resource
    description String
    (String) The description of the KMIP adapter.
    endpointType String
    id String
    instanceId String
    name String
    profile String
    (String) The profile of the KMIP adapter.
    profileData Map<String,String>
    (Map) The profile data of the KMIP adapter.
    updatedAt String
    (String) The date the resource was updated, in RFC 3339 format
    updatedBy String
    (String) The IBM-ID of the identity that updated the resource
    adapterId string
    createdAt string
    (String) The date the resource was created, in RFC 3339 format
    createdBy string
    (String) The IBM-ID of the identity that created the resource
    description string
    (String) The description of the KMIP adapter.
    endpointType string
    id string
    instanceId string
    name string
    profile string
    (String) The profile of the KMIP adapter.
    profileData {[key: string]: string}
    (Map) The profile data of the KMIP adapter.
    updatedAt string
    (String) The date the resource was updated, in RFC 3339 format
    updatedBy string
    (String) The IBM-ID of the identity that updated the resource
    adapter_id str
    created_at str
    (String) The date the resource was created, in RFC 3339 format
    created_by str
    (String) The IBM-ID of the identity that created the resource
    description str
    (String) The description of the KMIP adapter.
    endpoint_type str
    id str
    instance_id str
    name str
    profile str
    (String) The profile of the KMIP adapter.
    profile_data Mapping[str, str]
    (Map) The profile data of the KMIP adapter.
    updated_at str
    (String) The date the resource was updated, in RFC 3339 format
    updated_by str
    (String) The IBM-ID of the identity that updated the resource
    adapterId String
    createdAt String
    (String) The date the resource was created, in RFC 3339 format
    createdBy String
    (String) The IBM-ID of the identity that created the resource
    description String
    (String) The description of the KMIP adapter.
    endpointType String
    id String
    instanceId String
    name String
    profile String
    (String) The profile of the KMIP adapter.
    profileData Map<String>
    (Map) The profile data of the KMIP adapter.
    updatedAt String
    (String) The date the resource was updated, in RFC 3339 format
    updatedBy String
    (String) The IBM-ID of the identity that updated the resource

    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