1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. getPeers
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Blockchain.getPeers

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testPeers:
    fn::invoke:
      function: oci:Blockchain:getPeers
      arguments:
        blockchainPlatformId: ${testBlockchainPlatform.id}
        displayName: ${peerDisplayName}
Copy

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>
Copy
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]
Copy
func GetPeers(ctx *Context, args *GetPeersArgs, opts ...InvokeOption) (*GetPeersResult, error)
func GetPeersOutput(ctx *Context, args *GetPeersOutputArgs, opts ...InvokeOption) GetPeersResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetPeersResult> getPeers(GetPeersArgs args, InvokeOptions options)
public static Output<GetPeersResult> getPeers(GetPeersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Blockchain/getPeers:getPeers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BlockchainPlatformId This property is required. string
Unique service identifier.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
Filters Changes to this property will trigger replacement. List<GetPeersFilter>
BlockchainPlatformId This property is required. string
Unique service identifier.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
Filters Changes to this property will trigger replacement. []GetPeersFilter
blockchainPlatformId This property is required. String
Unique service identifier.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
filters Changes to this property will trigger replacement. List<GetPeersFilter>
blockchainPlatformId This property is required. string
Unique service identifier.
displayName string
A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
filters Changes to this property will trigger replacement. GetPeersFilter[]
blockchain_platform_id This property is required. str
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 Changes to this property will trigger replacement. Sequence[blockchain.GetPeersFilter]
blockchainPlatformId This property is required. String
Unique service identifier.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
filters Changes to this property will trigger replacement. List<Property Map>

getPeers Result

The following output properties are available:

BlockchainPlatformId string
Id string
The provider-assigned unique ID for this managed resource.
PeerCollections List<GetPeersPeerCollection>
The list of peer_collection.
DisplayName string
Filters List<GetPeersFilter>
BlockchainPlatformId string
Id string
The provider-assigned unique ID for this managed resource.
PeerCollections []GetPeersPeerCollection
The list of peer_collection.
DisplayName string
Filters []GetPeersFilter
blockchainPlatformId String
id String
The provider-assigned unique ID for this managed resource.
peerCollections List<GetPeersPeerCollection>
The list of peer_collection.
displayName String
filters List<GetPeersFilter>
blockchainPlatformId string
id string
The provider-assigned unique ID for this managed resource.
peerCollections GetPeersPeerCollection[]
The list of peer_collection.
displayName string
filters GetPeersFilter[]
blockchain_platform_id str
id str
The provider-assigned unique ID for this managed resource.
peer_collections Sequence[blockchain.GetPeersPeerCollection]
The list of peer_collection.
display_name str
filters Sequence[blockchain.GetPeersFilter]
blockchainPlatformId String
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

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetPeersPeerCollection

Items This property is required. List<GetPeersPeerCollectionItem>
Items This property is required. []GetPeersPeerCollectionItem
items This property is required. List<GetPeersPeerCollectionItem>
items This property is required. GetPeersPeerCollectionItem[]
items This property is required. List<Property Map>

GetPeersPeerCollectionItem

Ad This property is required. string
Availability Domain of peer
Alias This property is required. string
peer alias
BlockchainPlatformId This property is required. string
Unique service identifier.
Host This property is required. string
Host on which the Peer exists
OcpuAllocationParam This property is required. GetPeersPeerCollectionItemOcpuAllocationParam
OCPU allocation parameter
PeerKey This property is required. string
peer identifier
Role This property is required. string
Peer role
State This property is required. string
The current state of the peer.
Ad This property is required. string
Availability Domain of peer
Alias This property is required. string
peer alias
BlockchainPlatformId This property is required. string
Unique service identifier.
Host This property is required. string
Host on which the Peer exists
OcpuAllocationParam This property is required. GetPeersPeerCollectionItemOcpuAllocationParam
OCPU allocation parameter
PeerKey This property is required. string
peer identifier
Role This property is required. string
Peer role
State This property is required. string
The current state of the peer.
ad This property is required. String
Availability Domain of peer
alias This property is required. String
peer alias
blockchainPlatformId This property is required. String
Unique service identifier.
host This property is required. String
Host on which the Peer exists
ocpuAllocationParam This property is required. GetPeersPeerCollectionItemOcpuAllocationParam
OCPU allocation parameter
peerKey This property is required. String
peer identifier
role This property is required. String
Peer role
state This property is required. String
The current state of the peer.
ad This property is required. string
Availability Domain of peer
alias This property is required. string
peer alias
blockchainPlatformId This property is required. string
Unique service identifier.
host This property is required. string
Host on which the Peer exists
ocpuAllocationParam This property is required. GetPeersPeerCollectionItemOcpuAllocationParam
OCPU allocation parameter
peerKey This property is required. string
peer identifier
role This property is required. string
Peer role
state This property is required. string
The current state of the peer.
ad This property is required. str
Availability Domain of peer
alias This property is required. str
peer alias
blockchain_platform_id This property is required. str
Unique service identifier.
host This property is required. str
Host on which the Peer exists
ocpu_allocation_param This property is required. blockchain.GetPeersPeerCollectionItemOcpuAllocationParam
OCPU allocation parameter
peer_key This property is required. str
peer identifier
role This property is required. str
Peer role
state This property is required. str
The current state of the peer.
ad This property is required. String
Availability Domain of peer
alias This property is required. String
peer alias
blockchainPlatformId This property is required. String
Unique service identifier.
host This property is required. String
Host on which the Peer exists
ocpuAllocationParam This property is required. Property Map
OCPU allocation parameter
peerKey This property is required. String
peer identifier
role This property is required. String
Peer role
state This property is required. String
The current state of the peer.

GetPeersPeerCollectionItemOcpuAllocationParam

OcpuAllocationNumber This property is required. double
Number of OCPU allocation
OcpuAllocationNumber This property is required. float64
Number of OCPU allocation
ocpuAllocationNumber This property is required. Double
Number of OCPU allocation
ocpuAllocationNumber This property is required. number
Number of OCPU allocation
ocpu_allocation_number This property is required. float
Number of OCPU allocation
ocpuAllocationNumber This property is required. Number
Number of OCPU allocation

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi