ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getPagInstance
Explore with Pulumi AI
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.
- Resource
Group stringId - 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.
- Resource
Group stringId - 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.
- resource
Group StringId - 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.
- resource
Group stringId - 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_ strid - 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.
- resource
Group StringId - 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
- Onetime
Credentials bool - Parameters
Json 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.
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group stringId - Resource
Group stringName - Resource
Name string - Resource
Status string - Service string
- Status string
- (String) The status of resource instance.
- 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
- Onetime
Credentials bool - Parameters
Json 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.
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group stringId - Resource
Group stringName - Resource
Name string - Resource
Status string - Service string
- Status string
- (String) The status of resource instance.
- []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
- onetime
Credentials Boolean - parameters
Json 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.
- resource
Controller StringUrl - resource
Crn String - resource
Group StringId - resource
Group StringName - resource
Name String - resource
Status String - service String
- status String
- (String) The status of resource instance.
- 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
- onetime
Credentials boolean - parameters
Json 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.
- resource
Controller stringUrl - resource
Crn string - resource
Group stringId - resource
Group stringName - resource
Name string - resource
Status string - service string
- status string
- (String) The status of resource instance.
- 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_ strurl - resource_
crn str - resource_
group_ strid - resource_
group_ strname - resource_
name str - resource_
status str - service str
- status str
- (String) The status of resource instance.
- 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
- onetime
Credentials Boolean - parameters
Json 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.
- resource
Controller StringUrl - resource
Crn String - resource
Group StringId - resource
Group StringName - resource
Name String - resource
Status String - service String
- status String
- (String) The status of resource instance.
- 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.