Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi
oci.Blockchain.getPeers
Explore with Pulumi AI
This data source provides the list of Peers in Oracle Cloud Infrastructure Blockchain service.
List Blockchain Platform Peers
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testPeers = oci.Blockchain.getPeers({
    blockchainPlatformId: testBlockchainPlatform.id,
    displayName: peerDisplayName,
});
import pulumi
import pulumi_oci as oci
test_peers = oci.Blockchain.get_peers(blockchain_platform_id=test_blockchain_platform["id"],
    display_name=peer_display_name)
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.GetPeers(ctx, &blockchain.GetPeersArgs{
			BlockchainPlatformId: testBlockchainPlatform.Id,
			DisplayName:          pulumi.StringRef(peerDisplayName),
		}, 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 testPeers = Oci.Blockchain.GetPeers.Invoke(new()
    {
        BlockchainPlatformId = testBlockchainPlatform.Id,
        DisplayName = peerDisplayName,
    });
});
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.GetPeersArgs;
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 testPeers = BlockchainFunctions.getPeers(GetPeersArgs.builder()
            .blockchainPlatformId(testBlockchainPlatform.id())
            .displayName(peerDisplayName)
            .build());
    }
}
variables:
  testPeers:
    fn::invoke:
      function: oci:Blockchain:getPeers
      arguments:
        blockchainPlatformId: ${testBlockchainPlatform.id}
        displayName: ${peerDisplayName}
Using getPeers
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 getPeers(args: GetPeersArgs, opts?: InvokeOptions): Promise<GetPeersResult>
function getPeersOutput(args: GetPeersOutputArgs, opts?: InvokeOptions): Output<GetPeersResult>def get_peers(blockchain_platform_id: Optional[str] = None,
              display_name: Optional[str] = None,
              filters: Optional[Sequence[_blockchain.GetPeersFilter]] = None,
              opts: Optional[InvokeOptions] = None) -> GetPeersResult
def get_peers_output(blockchain_platform_id: Optional[pulumi.Input[str]] = None,
              display_name: Optional[pulumi.Input[str]] = None,
              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_blockchain.GetPeersFilterArgs]]]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetPeersResult]func GetPeers(ctx *Context, args *GetPeersArgs, opts ...InvokeOption) (*GetPeersResult, error)
func GetPeersOutput(ctx *Context, args *GetPeersOutputArgs, opts ...InvokeOption) GetPeersResultOutput> Note: This function is named GetPeers in the Go SDK.
public static class GetPeers 
{
    public static Task<GetPeersResult> InvokeAsync(GetPeersArgs args, InvokeOptions? opts = null)
    public static Output<GetPeersResult> Invoke(GetPeersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPeersResult> getPeers(GetPeersArgs args, InvokeOptions options)
public static Output<GetPeersResult> getPeers(GetPeersArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Blockchain/getPeers:getPeers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BlockchainPlatform stringId 
- Unique service identifier.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
List<GetPeers Filter> 
- BlockchainPlatform stringId 
- Unique service identifier.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
[]GetPeers Filter 
- blockchainPlatform StringId 
- Unique service identifier.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
List<GetPeers Filter> 
- blockchainPlatform stringId 
- Unique service identifier.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
GetPeers Filter[] 
- blockchain_platform_ strid 
- Unique service identifier.
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
Sequence[blockchain.Get Peers Filter] 
- blockchainPlatform StringId 
- Unique service identifier.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters List<Property Map>
getPeers Result
The following output properties are available:
- BlockchainPlatform stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- PeerCollections List<GetPeers Peer Collection> 
- The list of peer_collection.
- DisplayName string
- Filters
List<GetPeers Filter> 
- BlockchainPlatform stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- PeerCollections []GetPeers Peer Collection 
- The list of peer_collection.
- DisplayName string
- Filters
[]GetPeers Filter 
- blockchainPlatform StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- peerCollections List<GetPeers Peer Collection> 
- The list of peer_collection.
- displayName String
- filters
List<GetPeers Filter> 
- blockchainPlatform stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- peerCollections GetPeers Peer Collection[] 
- The list of peer_collection.
- displayName string
- filters
GetPeers Filter[] 
- blockchain_platform_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- peer_collections Sequence[blockchain.Get Peers Peer Collection] 
- The list of peer_collection.
- display_name str
- filters
Sequence[blockchain.Get Peers Filter] 
- blockchainPlatform StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- peerCollections List<Property Map>
- The list of peer_collection.
- displayName String
- filters List<Property Map>
Supporting Types
GetPeersFilter  
GetPeersPeerCollection   
GetPeersPeerCollectionItem    
- Ad string
- Availability Domain of peer
- Alias string
- peer alias
- BlockchainPlatform stringId 
- Unique service identifier.
- Host string
- Host on which the Peer exists
- OcpuAllocation GetParam Peers Peer Collection Item Ocpu Allocation Param 
- OCPU allocation parameter
- 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 
- Unique service identifier.
- Host string
- Host on which the Peer exists
- OcpuAllocation GetParam Peers Peer Collection Item Ocpu Allocation Param 
- OCPU allocation parameter
- 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 
- Unique service identifier.
- host String
- Host on which the Peer exists
- ocpuAllocation GetParam Peers Peer Collection Item Ocpu Allocation Param 
- OCPU allocation parameter
- 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 
- Unique service identifier.
- host string
- Host on which the Peer exists
- ocpuAllocation GetParam Peers Peer Collection Item Ocpu Allocation Param 
- OCPU allocation parameter
- 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 
- Unique service identifier.
- host str
- Host on which the Peer exists
- ocpu_allocation_ blockchain.param Get Peers Peer Collection Item Ocpu Allocation Param 
- OCPU allocation parameter
- 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 
- Unique service identifier.
- host String
- Host on which the Peer exists
- ocpuAllocation Property MapParam 
- OCPU allocation parameter
- peerKey String
- peer identifier
- role String
- Peer role
- state String
- The current state of the peer.
GetPeersPeerCollectionItemOcpuAllocationParam       
- 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.