Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Blockchain.getPeer
Explore with Pulumi AI
This data source provides details about a specific Peer resource in Oracle Cloud Infrastructure Blockchain service.
Gets information about a peer identified by the specific id
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testPeer = oci.Blockchain.getPeer({
    blockchainPlatformId: testBlockchainPlatform.id,
    peerId: testPeerOciBlockchainPeer.id,
});
import pulumi
import pulumi_oci as oci
test_peer = oci.Blockchain.get_peer(blockchain_platform_id=test_blockchain_platform["id"],
    peer_id=test_peer_oci_blockchain_peer["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/blockchain"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := blockchain.GetPeer(ctx, &blockchain.GetPeerArgs{
			BlockchainPlatformId: testBlockchainPlatform.Id,
			PeerId:               testPeerOciBlockchainPeer.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testPeer = Oci.Blockchain.GetPeer.Invoke(new()
    {
        BlockchainPlatformId = testBlockchainPlatform.Id,
        PeerId = testPeerOciBlockchainPeer.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Blockchain.BlockchainFunctions;
import com.pulumi.oci.Blockchain.inputs.GetPeerArgs;
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 testPeer = BlockchainFunctions.getPeer(GetPeerArgs.builder()
            .blockchainPlatformId(testBlockchainPlatform.id())
            .peerId(testPeerOciBlockchainPeer.id())
            .build());
    }
}
variables:
  testPeer:
    fn::invoke:
      function: oci:Blockchain:getPeer
      arguments:
        blockchainPlatformId: ${testBlockchainPlatform.id}
        peerId: ${testPeerOciBlockchainPeer.id}
Using getPeer
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 getPeer(args: GetPeerArgs, opts?: InvokeOptions): Promise<GetPeerResult>
function getPeerOutput(args: GetPeerOutputArgs, opts?: InvokeOptions): Output<GetPeerResult>def get_peer(blockchain_platform_id: Optional[str] = None,
             peer_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetPeerResult
def get_peer_output(blockchain_platform_id: Optional[pulumi.Input[str]] = None,
             peer_id: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetPeerResult]func LookupPeer(ctx *Context, args *LookupPeerArgs, opts ...InvokeOption) (*LookupPeerResult, error)
func LookupPeerOutput(ctx *Context, args *LookupPeerOutputArgs, opts ...InvokeOption) LookupPeerResultOutput> Note: This function is named LookupPeer in the Go SDK.
public static class GetPeer 
{
    public static Task<GetPeerResult> InvokeAsync(GetPeerArgs args, InvokeOptions? opts = null)
    public static Output<GetPeerResult> Invoke(GetPeerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPeerResult> getPeer(GetPeerArgs args, InvokeOptions options)
public static Output<GetPeerResult> getPeer(GetPeerArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Blockchain/getPeer:getPeer
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BlockchainPlatform stringId 
- Unique service identifier.
- PeerId string
- Peer identifier.
- BlockchainPlatform stringId 
- Unique service identifier.
- PeerId string
- Peer identifier.
- blockchainPlatform StringId 
- Unique service identifier.
- peerId String
- Peer identifier.
- blockchainPlatform stringId 
- Unique service identifier.
- peerId string
- Peer identifier.
- blockchain_platform_ strid 
- Unique service identifier.
- peer_id str
- Peer identifier.
- blockchainPlatform StringId 
- Unique service identifier.
- peerId String
- Peer identifier.
getPeer Result
The following output properties are available:
- Ad string
- Availability Domain of peer
- Alias string
- peer alias
- BlockchainPlatform stringId 
- Host string
- Host on which the Peer exists
- Id string
- OcpuAllocation List<GetParams Peer Ocpu Allocation Param> 
- OCPU allocation parameter
- PeerId string
- PeerKey string
- peer identifier
- Role string
- Peer role
- State string
- The current state of the peer.
- Ad string
- Availability Domain of peer
- Alias string
- peer alias
- BlockchainPlatform stringId 
- Host string
- Host on which the Peer exists
- Id string
- OcpuAllocation []GetParams Peer Ocpu Allocation Param 
- OCPU allocation parameter
- PeerId string
- PeerKey string
- peer identifier
- Role string
- Peer role
- State string
- The current state of the peer.
- ad String
- Availability Domain of peer
- alias String
- peer alias
- blockchainPlatform StringId 
- host String
- Host on which the Peer exists
- id String
- ocpuAllocation List<GetParams Peer Ocpu Allocation Param> 
- OCPU allocation parameter
- peerId String
- peerKey String
- peer identifier
- role String
- Peer role
- state String
- The current state of the peer.
- ad string
- Availability Domain of peer
- alias string
- peer alias
- blockchainPlatform stringId 
- host string
- Host on which the Peer exists
- id string
- ocpuAllocation GetParams Peer Ocpu Allocation Param[] 
- OCPU allocation parameter
- peerId string
- peerKey string
- peer identifier
- role string
- Peer role
- state string
- The current state of the peer.
- ad str
- Availability Domain of peer
- alias str
- peer alias
- blockchain_platform_ strid 
- host str
- Host on which the Peer exists
- id str
- ocpu_allocation_ Sequence[Getparams Peer Ocpu Allocation Param] 
- OCPU allocation parameter
- peer_id str
- peer_key str
- peer identifier
- role str
- Peer role
- state str
- The current state of the peer.
- ad String
- Availability Domain of peer
- alias String
- peer alias
- blockchainPlatform StringId 
- host String
- Host on which the Peer exists
- id String
- ocpuAllocation List<Property Map>Params 
- OCPU allocation parameter
- peerId String
- peerKey String
- peer identifier
- role String
- Peer role
- state String
- The current state of the peer.
Supporting Types
GetPeerOcpuAllocationParam    
- OcpuAllocation doubleNumber 
- Number of OCPU allocation
- OcpuAllocation float64Number 
- Number of OCPU allocation
- ocpuAllocation DoubleNumber 
- Number of OCPU allocation
- ocpuAllocation numberNumber 
- Number of OCPU allocation
- ocpu_allocation_ floatnumber 
- Number of OCPU allocation
- ocpuAllocation NumberNumber 
- Number of OCPU allocation
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.