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

ibm.getKmsKmipObject

Explore with Pulumi AI

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

    Example Usage

    Sample example to list KMIP objects in a given adapter

    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 = ibm.getKmsKmipAdapter({
        instanceId: ibm_resource_instance.kp_instance.guid,
        name: "myadapter",
    });
    const object = myadapter.then(myadapter => ibm.getKmsKmipObject({
        instanceId: ibm_resource_instance.kp_instance.guid,
        adapterId: myadapter.id,
        objectId: "<object-UUID>",
    }));
    
    import pulumi
    import pulumi_ibm as ibm
    
    kms_instance = ibm.ResourceInstance("kmsInstance",
        service="kms",
        plan="tiered-pricing",
        location="us-south")
    myadapter = ibm.get_kms_kmip_adapter(instance_id=ibm_resource_instance["kp_instance"]["guid"],
        name="myadapter")
    object = ibm.get_kms_kmip_object(instance_id=ibm_resource_instance["kp_instance"]["guid"],
        adapter_id=myadapter.id,
        object_id="<object-UUID>")
    
    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.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.LookupKmsKmipAdapter(ctx, &ibm.LookupKmsKmipAdapterArgs{
    			InstanceId: ibm_resource_instance.Kp_instance.Guid,
    			Name:       pulumi.StringRef("myadapter"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.GetKmsKmipObject(ctx, &ibm.GetKmsKmipObjectArgs{
    			InstanceId: ibm_resource_instance.Kp_instance.Guid,
    			AdapterId:  pulumi.StringRef(myadapter.Id),
    			ObjectId:   "<object-UUID>",
    		}, 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 kmsInstance = new Ibm.ResourceInstance("kmsInstance", new()
        {
            Service = "kms",
            Plan = "tiered-pricing",
            Location = "us-south",
        });
    
        var myadapter = Ibm.GetKmsKmipAdapter.Invoke(new()
        {
            InstanceId = ibm_resource_instance.Kp_instance.Guid,
            Name = "myadapter",
        });
    
        var @object = Ibm.GetKmsKmipObject.Invoke(new()
        {
            InstanceId = ibm_resource_instance.Kp_instance.Guid,
            AdapterId = myadapter.Apply(getKmsKmipAdapterResult => getKmsKmipAdapterResult.Id),
            ObjectId = "<object-UUID>",
        });
    
    });
    
    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.IbmFunctions;
    import com.pulumi.ibm.inputs.GetKmsKmipAdapterArgs;
    import com.pulumi.ibm.inputs.GetKmsKmipObjectArgs;
    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());
    
            final var myadapter = IbmFunctions.getKmsKmipAdapter(GetKmsKmipAdapterArgs.builder()
                .instanceId(ibm_resource_instance.kp_instance().guid())
                .name("myadapter")
                .build());
    
            final var object = IbmFunctions.getKmsKmipObject(GetKmsKmipObjectArgs.builder()
                .instanceId(ibm_resource_instance.kp_instance().guid())
                .adapterId(myadapter.applyValue(getKmsKmipAdapterResult -> getKmsKmipAdapterResult.id()))
                .objectId("<object-UUID>")
                .build());
    
        }
    }
    
    resources:
      kmsInstance:
        type: ibm:ResourceInstance
        properties:
          service: kms
          plan: tiered-pricing
          location: us-south
    variables:
      myadapter:
        fn::invoke:
          function: ibm:getKmsKmipAdapter
          arguments:
            instanceId: ${ibm_resource_instance.kp_instance.guid}
            name: myadapter
      object:
        fn::invoke:
          function: ibm:getKmsKmipObject
          arguments:
            instanceId: ${ibm_resource_instance.kp_instance.guid}
            adapterId: ${myadapter.id}
            objectId: <object-UUID>
    

    Using getKmsKmipObject

    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 getKmsKmipObject(args: GetKmsKmipObjectArgs, opts?: InvokeOptions): Promise<GetKmsKmipObjectResult>
    function getKmsKmipObjectOutput(args: GetKmsKmipObjectOutputArgs, opts?: InvokeOptions): Output<GetKmsKmipObjectResult>
    def get_kms_kmip_object(adapter_id: Optional[str] = None,
                            adapter_name: Optional[str] = None,
                            endpoint_type: Optional[str] = None,
                            id: Optional[str] = None,
                            instance_id: Optional[str] = None,
                            object_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetKmsKmipObjectResult
    def get_kms_kmip_object_output(adapter_id: Optional[pulumi.Input[str]] = None,
                            adapter_name: 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,
                            object_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetKmsKmipObjectResult]
    func GetKmsKmipObject(ctx *Context, args *GetKmsKmipObjectArgs, opts ...InvokeOption) (*GetKmsKmipObjectResult, error)
    func GetKmsKmipObjectOutput(ctx *Context, args *GetKmsKmipObjectOutputArgs, opts ...InvokeOption) GetKmsKmipObjectResultOutput

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

    public static class GetKmsKmipObject 
    {
        public static Task<GetKmsKmipObjectResult> InvokeAsync(GetKmsKmipObjectArgs args, InvokeOptions? opts = null)
        public static Output<GetKmsKmipObjectResult> Invoke(GetKmsKmipObjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKmsKmipObjectResult> getKmsKmipObject(GetKmsKmipObjectArgs args, InvokeOptions options)
    public static Output<GetKmsKmipObjectResult> getKmsKmipObject(GetKmsKmipObjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getKmsKmipObject:getKmsKmipObject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The key protect instance GUID.
    ObjectId string
    The id of the KMIP object to be fetched
    AdapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    AdapterName string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    EndpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    Id string
    InstanceId string
    The key protect instance GUID.
    ObjectId string
    The id of the KMIP object to be fetched
    AdapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    AdapterName string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    EndpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    Id string
    instanceId String
    The key protect instance GUID.
    objectId String
    The id of the KMIP object to be fetched
    adapterId String
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    adapterName String
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    endpointType String
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id String
    instanceId string
    The key protect instance GUID.
    objectId string
    The id of the KMIP object to be fetched
    adapterId string
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    adapterName string
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    endpointType string
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id string
    instance_id str
    The key protect instance GUID.
    object_id str
    The id of the KMIP object to be fetched
    adapter_id str
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    adapter_name str
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. 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
    instanceId String
    The key protect instance GUID.
    objectId String
    The id of the KMIP object to be fetched
    adapterId String
    The UUID of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_name. One has to be given.
    adapterName String
    The name of the KMIP adapter to be fetched. Mutually exclusive argument with adapter_id. One has to be given.
    endpointType String
    The type of the public endpoint, or private endpoint to be used for creating keys.
    id String

    getKmsKmipObject Result

    The following output properties are available:

    AdapterId string
    AdapterName 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
    CreatedByCertId string
    (String) The ID of the certificate that created the object
    DestroyedAt string
    (String) The date the resource was destroyed, in RFC 3339 format
    DestroyedBy string
    (String) The IBM-ID of the identity that destroyed the resource
    DestroyedByCertId string
    (String) The ID of the certificate that destroyed the object
    EndpointType string
    Id string
    InstanceId string
    ObjectId string
    ObjectState double
    (Integer) The state of the KMIP object
    ObjectType double
    (Integer) The type of the KMIP object as an enum
    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
    UpdatedByCertId string
    (String) The ID of the certificate that updated the object
    AdapterId string
    AdapterName 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
    CreatedByCertId string
    (String) The ID of the certificate that created the object
    DestroyedAt string
    (String) The date the resource was destroyed, in RFC 3339 format
    DestroyedBy string
    (String) The IBM-ID of the identity that destroyed the resource
    DestroyedByCertId string
    (String) The ID of the certificate that destroyed the object
    EndpointType string
    Id string
    InstanceId string
    ObjectId string
    ObjectState float64
    (Integer) The state of the KMIP object
    ObjectType float64
    (Integer) The type of the KMIP object as an enum
    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
    UpdatedByCertId string
    (String) The ID of the certificate that updated the object
    adapterId String
    adapterName 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
    createdByCertId String
    (String) The ID of the certificate that created the object
    destroyedAt String
    (String) The date the resource was destroyed, in RFC 3339 format
    destroyedBy String
    (String) The IBM-ID of the identity that destroyed the resource
    destroyedByCertId String
    (String) The ID of the certificate that destroyed the object
    endpointType String
    id String
    instanceId String
    objectId String
    objectState Double
    (Integer) The state of the KMIP object
    objectType Double
    (Integer) The type of the KMIP object as an enum
    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
    updatedByCertId String
    (String) The ID of the certificate that updated the object
    adapterId string
    adapterName 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
    createdByCertId string
    (String) The ID of the certificate that created the object
    destroyedAt string
    (String) The date the resource was destroyed, in RFC 3339 format
    destroyedBy string
    (String) The IBM-ID of the identity that destroyed the resource
    destroyedByCertId string
    (String) The ID of the certificate that destroyed the object
    endpointType string
    id string
    instanceId string
    objectId string
    objectState number
    (Integer) The state of the KMIP object
    objectType number
    (Integer) The type of the KMIP object as an enum
    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
    updatedByCertId string
    (String) The ID of the certificate that updated the object
    adapter_id str
    adapter_name 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
    created_by_cert_id str
    (String) The ID of the certificate that created the object
    destroyed_at str
    (String) The date the resource was destroyed, in RFC 3339 format
    destroyed_by str
    (String) The IBM-ID of the identity that destroyed the resource
    destroyed_by_cert_id str
    (String) The ID of the certificate that destroyed the object
    endpoint_type str
    id str
    instance_id str
    object_id str
    object_state float
    (Integer) The state of the KMIP object
    object_type float
    (Integer) The type of the KMIP object as an enum
    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
    updated_by_cert_id str
    (String) The ID of the certificate that updated the object
    adapterId String
    adapterName 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
    createdByCertId String
    (String) The ID of the certificate that created the object
    destroyedAt String
    (String) The date the resource was destroyed, in RFC 3339 format
    destroyedBy String
    (String) The IBM-ID of the identity that destroyed the resource
    destroyedByCertId String
    (String) The ID of the certificate that destroyed the object
    endpointType String
    id String
    instanceId String
    objectId String
    objectState Number
    (Integer) The state of the KMIP object
    objectType Number
    (Integer) The type of the KMIP object as an enum
    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
    updatedByCertId String
    (String) The ID of the certificate that updated the object

    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