1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. getPeer
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Blockchain.getPeer

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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 GetPeer(ctx *Context, args *GetPeerArgs, opts ...InvokeOption) (*GetPeerResult, error)
    func GetPeerOutput(ctx *Context, args *GetPeerOutputArgs, opts ...InvokeOption) GetPeerResultOutput

    > Note: This function is named GetPeer 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Blockchain/getPeer:getPeer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BlockchainPlatformId string
    Unique service identifier.
    PeerId string
    Peer identifier.
    BlockchainPlatformId string
    Unique service identifier.
    PeerId string
    Peer identifier.
    blockchainPlatformId String
    Unique service identifier.
    peerId String
    Peer identifier.
    blockchainPlatformId string
    Unique service identifier.
    peerId string
    Peer identifier.
    blockchain_platform_id str
    Unique service identifier.
    peer_id str
    Peer identifier.
    blockchainPlatformId String
    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
    BlockchainPlatformId string
    Host string
    Host on which the Peer exists
    Id string
    OcpuAllocationParams List<GetPeerOcpuAllocationParam>
    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
    BlockchainPlatformId string
    Host string
    Host on which the Peer exists
    Id string
    OcpuAllocationParams []GetPeerOcpuAllocationParam
    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
    blockchainPlatformId String
    host String
    Host on which the Peer exists
    id String
    ocpuAllocationParams List<GetPeerOcpuAllocationParam>
    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
    blockchainPlatformId string
    host string
    Host on which the Peer exists
    id string
    ocpuAllocationParams GetPeerOcpuAllocationParam[]
    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_id str
    host str
    Host on which the Peer exists
    id str
    ocpu_allocation_params Sequence[blockchain.GetPeerOcpuAllocationParam]
    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
    blockchainPlatformId String
    host String
    Host on which the Peer exists
    id String
    ocpuAllocationParams List<Property Map>
    OCPU allocation parameter
    peerId String
    peerKey String
    peer identifier
    role String
    Peer role
    state String
    The current state of the peer.

    Supporting Types

    GetPeerOcpuAllocationParam

    OcpuAllocationNumber double
    Number of OCPU allocation
    OcpuAllocationNumber float64
    Number of OCPU allocation
    ocpuAllocationNumber Double
    Number of OCPU allocation
    ocpuAllocationNumber number
    Number of OCPU allocation
    ocpu_allocation_number float
    Number of OCPU allocation
    ocpuAllocationNumber 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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi