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

ibm.getPagInstance

Explore with Pulumi AI

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

    Retrieve information about an existing IBM Privileged Access Gateway (PAG) instance from IBM Cloud as a read-only data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const group = ibm.getResourceGroup({
        name: "default",
    });
    const testaccDsPagInstance = group.then(group => ibm.getPagInstance({
        name: "myPagInstance",
        resourceGroupId: group.id,
        service: "privileged-access-gateway",
    }));
    
    import pulumi
    import pulumi_ibm as ibm
    
    group = ibm.get_resource_group(name="default")
    testacc_ds_pag_instance = ibm.get_pag_instance(name="myPagInstance",
        resource_group_id=group.id,
        service="privileged-access-gateway")
    
    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 {
    		group, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
    			Name: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.LookupPagInstance(ctx, &ibm.LookupPagInstanceArgs{
    			Name:            pulumi.StringRef("myPagInstance"),
    			ResourceGroupId: pulumi.StringRef(group.Id),
    			Service:         pulumi.StringRef("privileged-access-gateway"),
    		}, 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 @group = Ibm.GetResourceGroup.Invoke(new()
        {
            Name = "default",
        });
    
        var testaccDsPagInstance = Ibm.GetPagInstance.Invoke(new()
        {
            Name = "myPagInstance",
            ResourceGroupId = @group.Apply(getResourceGroupResult => getResourceGroupResult.Id),
            Service = "privileged-access-gateway",
        });
    
    });
    
    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.GetResourceGroupArgs;
    import com.pulumi.ibm.inputs.GetPagInstanceArgs;
    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 group = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
                .name("default")
                .build());
    
            final var testaccDsPagInstance = IbmFunctions.getPagInstance(GetPagInstanceArgs.builder()
                .name("myPagInstance")
                .resourceGroupId(group.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
                .service("privileged-access-gateway")
                .build());
    
        }
    }
    
    variables:
      group:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            name: default
      testaccDsPagInstance:
        fn::invoke:
          function: ibm:getPagInstance
          arguments:
            name: myPagInstance
            resourceGroupId: ${group.id}
            service: privileged-access-gateway
    

    Using getPagInstance

    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 getPagInstance(args: GetPagInstanceArgs, opts?: InvokeOptions): Promise<GetPagInstanceResult>
    function getPagInstanceOutput(args: GetPagInstanceOutputArgs, opts?: InvokeOptions): Output<GetPagInstanceResult>
    def get_pag_instance(id: Optional[str] = None,
                         identifier: Optional[str] = None,
                         location: Optional[str] = None,
                         name: Optional[str] = None,
                         resource_group_id: Optional[str] = None,
                         service: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPagInstanceResult
    def get_pag_instance_output(id: Optional[pulumi.Input[str]] = None,
                         identifier: Optional[pulumi.Input[str]] = None,
                         location: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         resource_group_id: Optional[pulumi.Input[str]] = None,
                         service: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPagInstanceResult]
    func LookupPagInstance(ctx *Context, args *LookupPagInstanceArgs, opts ...InvokeOption) (*LookupPagInstanceResult, error)
    func LookupPagInstanceOutput(ctx *Context, args *LookupPagInstanceOutputArgs, opts ...InvokeOption) LookupPagInstanceResultOutput

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

    public static class GetPagInstance 
    {
        public static Task<GetPagInstanceResult> InvokeAsync(GetPagInstanceArgs args, InvokeOptions? opts = null)
        public static Output<GetPagInstanceResult> Invoke(GetPagInstanceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPagInstanceResult> getPagInstance(GetPagInstanceArgs args, InvokeOptions options)
    public static Output<GetPagInstanceResult> getPagInstance(GetPagInstanceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPagInstance:getPagInstance
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier of the resource instance.
    Identifier string
    Location string
    The location or the environment in which the PAG instance exists.
    Name string
    The name of the PAG instance.
    ResourceGroupId string
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    Service string
    The service type of the PAG instance.
    Id string
    (String) The unique identifier of the resource instance.
    Identifier string
    Location string
    The location or the environment in which the PAG instance exists.
    Name string
    The name of the PAG instance.
    ResourceGroupId string
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    Service string
    The service type of the PAG instance.
    id String
    (String) The unique identifier of the resource instance.
    identifier String
    location String
    The location or the environment in which the PAG instance exists.
    name String
    The name of the PAG instance.
    resourceGroupId String
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    service String
    The service type of the PAG instance.
    id string
    (String) The unique identifier of the resource instance.
    identifier string
    location string
    The location or the environment in which the PAG instance exists.
    name string
    The name of the PAG instance.
    resourceGroupId string
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    service string
    The service type of the PAG instance.
    id str
    (String) The unique identifier of the resource instance.
    identifier str
    location str
    The location or the environment in which the PAG instance exists.
    name str
    The name of the PAG instance.
    resource_group_id str
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    service str
    The service type of the PAG instance.
    id String
    (String) The unique identifier of the resource instance.
    identifier String
    location String
    The location or the environment in which the PAG instance exists.
    name String
    The name of the PAG instance.
    resourceGroupId String
    The ID of the resource group where the PAG instance exists. If not provided it takes the default resource group.
    service String
    The service type of the PAG instance.

    getPagInstance Result

    The following output properties are available:

    Crn string
    Extensions Dictionary<string, string>
    Guid string
    (String) The GUID of the resource instance.
    Id string
    (String) The unique identifier of the resource instance.
    Location string
    Name string
    OnetimeCredentials bool
    ParametersJson string
    (String) The parameters associated with the instance in json format.
    Plan string
    (String) The plan for the service offering used by this resource instance.
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroupId string
    ResourceGroupName string
    ResourceName string
    ResourceStatus string
    Service string
    Status string
    (String) The status of resource instance.
    Tags List<string>
    Identifier string
    Crn string
    Extensions map[string]string
    Guid string
    (String) The GUID of the resource instance.
    Id string
    (String) The unique identifier of the resource instance.
    Location string
    Name string
    OnetimeCredentials bool
    ParametersJson string
    (String) The parameters associated with the instance in json format.
    Plan string
    (String) The plan for the service offering used by this resource instance.
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroupId string
    ResourceGroupName string
    ResourceName string
    ResourceStatus string
    Service string
    Status string
    (String) The status of resource instance.
    Tags []string
    Identifier string
    crn String
    extensions Map<String,String>
    guid String
    (String) The GUID of the resource instance.
    id String
    (String) The unique identifier of the resource instance.
    location String
    name String
    onetimeCredentials Boolean
    parametersJson String
    (String) The parameters associated with the instance in json format.
    plan String
    (String) The plan for the service offering used by this resource instance.
    resourceControllerUrl String
    resourceCrn String
    resourceGroupId String
    resourceGroupName String
    resourceName String
    resourceStatus String
    service String
    status String
    (String) The status of resource instance.
    tags List<String>
    identifier String
    crn string
    extensions {[key: string]: string}
    guid string
    (String) The GUID of the resource instance.
    id string
    (String) The unique identifier of the resource instance.
    location string
    name string
    onetimeCredentials boolean
    parametersJson string
    (String) The parameters associated with the instance in json format.
    plan string
    (String) The plan for the service offering used by this resource instance.
    resourceControllerUrl string
    resourceCrn string
    resourceGroupId string
    resourceGroupName string
    resourceName string
    resourceStatus string
    service string
    status string
    (String) The status of resource instance.
    tags string[]
    identifier string
    crn str
    extensions Mapping[str, str]
    guid str
    (String) The GUID of the resource instance.
    id str
    (String) The unique identifier of the resource instance.
    location str
    name str
    onetime_credentials bool
    parameters_json str
    (String) The parameters associated with the instance in json format.
    plan str
    (String) The plan for the service offering used by this resource instance.
    resource_controller_url str
    resource_crn str
    resource_group_id str
    resource_group_name str
    resource_name str
    resource_status str
    service str
    status str
    (String) The status of resource instance.
    tags Sequence[str]
    identifier str
    crn String
    extensions Map<String>
    guid String
    (String) The GUID of the resource instance.
    id String
    (String) The unique identifier of the resource instance.
    location String
    name String
    onetimeCredentials Boolean
    parametersJson String
    (String) The parameters associated with the instance in json format.
    plan String
    (String) The plan for the service offering used by this resource instance.
    resourceControllerUrl String
    resourceCrn String
    resourceGroupId String
    resourceGroupName String
    resourceName String
    resourceStatus String
    service String
    status String
    (String) The status of resource instance.
    tags List<String>
    identifier String

    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