1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. Peer
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Blockchain.Peer

Explore with Pulumi AI

This resource provides the Peer resource in Oracle Cloud Infrastructure Blockchain service.

Create Blockchain Platform Peer

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testPeer = new oci.blockchain.Peer("test_peer", {
    ad: peerAd,
    blockchainPlatformId: testBlockchainPlatform.id,
    ocpuAllocationParam: {
        ocpuAllocationNumber: peerOcpuAllocationParamOcpuAllocationNumber,
    },
    role: peerRole,
    alias: peerAlias,
});
Copy
import pulumi
import pulumi_oci as oci

test_peer = oci.blockchain.Peer("test_peer",
    ad=peer_ad,
    blockchain_platform_id=test_blockchain_platform["id"],
    ocpu_allocation_param={
        "ocpu_allocation_number": peer_ocpu_allocation_param_ocpu_allocation_number,
    },
    role=peer_role,
    alias=peer_alias)
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.NewPeer(ctx, "test_peer", &blockchain.PeerArgs{
			Ad:                   pulumi.Any(peerAd),
			BlockchainPlatformId: pulumi.Any(testBlockchainPlatform.Id),
			OcpuAllocationParam: &blockchain.PeerOcpuAllocationParamArgs{
				OcpuAllocationNumber: pulumi.Any(peerOcpuAllocationParamOcpuAllocationNumber),
			},
			Role:  pulumi.Any(peerRole),
			Alias: pulumi.Any(peerAlias),
		})
		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 testPeer = new Oci.Blockchain.Peer("test_peer", new()
    {
        Ad = peerAd,
        BlockchainPlatformId = testBlockchainPlatform.Id,
        OcpuAllocationParam = new Oci.Blockchain.Inputs.PeerOcpuAllocationParamArgs
        {
            OcpuAllocationNumber = peerOcpuAllocationParamOcpuAllocationNumber,
        },
        Role = peerRole,
        Alias = peerAlias,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Blockchain.Peer;
import com.pulumi.oci.Blockchain.PeerArgs;
import com.pulumi.oci.Blockchain.inputs.PeerOcpuAllocationParamArgs;
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) {
        var testPeer = new Peer("testPeer", PeerArgs.builder()
            .ad(peerAd)
            .blockchainPlatformId(testBlockchainPlatform.id())
            .ocpuAllocationParam(PeerOcpuAllocationParamArgs.builder()
                .ocpuAllocationNumber(peerOcpuAllocationParamOcpuAllocationNumber)
                .build())
            .role(peerRole)
            .alias(peerAlias)
            .build());

    }
}
Copy
resources:
  testPeer:
    type: oci:Blockchain:Peer
    name: test_peer
    properties:
      ad: ${peerAd}
      blockchainPlatformId: ${testBlockchainPlatform.id}
      ocpuAllocationParam:
        ocpuAllocationNumber: ${peerOcpuAllocationParamOcpuAllocationNumber}
      role: ${peerRole}
      alias: ${peerAlias}
Copy

Create Peer Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Peer(name: string, args: PeerArgs, opts?: CustomResourceOptions);
@overload
def Peer(resource_name: str,
         args: PeerArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def Peer(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         ad: Optional[str] = None,
         blockchain_platform_id: Optional[str] = None,
         ocpu_allocation_param: Optional[_blockchain.PeerOcpuAllocationParamArgs] = None,
         role: Optional[str] = None,
         alias: Optional[str] = None)
func NewPeer(ctx *Context, name string, args PeerArgs, opts ...ResourceOption) (*Peer, error)
public Peer(string name, PeerArgs args, CustomResourceOptions? opts = null)
public Peer(String name, PeerArgs args)
public Peer(String name, PeerArgs args, CustomResourceOptions options)
type: oci:Blockchain:Peer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PeerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PeerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PeerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var peerResource = new Oci.Blockchain.Peer("peerResource", new()
{
    Ad = "string",
    BlockchainPlatformId = "string",
    OcpuAllocationParam = new Oci.Blockchain.Inputs.PeerOcpuAllocationParamArgs
    {
        OcpuAllocationNumber = 0,
    },
    Role = "string",
    Alias = "string",
});
Copy
example, err := Blockchain.NewPeer(ctx, "peerResource", &Blockchain.PeerArgs{
	Ad:                   pulumi.String("string"),
	BlockchainPlatformId: pulumi.String("string"),
	OcpuAllocationParam: &blockchain.PeerOcpuAllocationParamArgs{
		OcpuAllocationNumber: pulumi.Float64(0),
	},
	Role:  pulumi.String("string"),
	Alias: pulumi.String("string"),
})
Copy
var peerResource = new Peer("peerResource", PeerArgs.builder()
    .ad("string")
    .blockchainPlatformId("string")
    .ocpuAllocationParam(PeerOcpuAllocationParamArgs.builder()
        .ocpuAllocationNumber(0)
        .build())
    .role("string")
    .alias("string")
    .build());
Copy
peer_resource = oci.blockchain.Peer("peerResource",
    ad="string",
    blockchain_platform_id="string",
    ocpu_allocation_param={
        "ocpu_allocation_number": 0,
    },
    role="string",
    alias="string")
Copy
const peerResource = new oci.blockchain.Peer("peerResource", {
    ad: "string",
    blockchainPlatformId: "string",
    ocpuAllocationParam: {
        ocpuAllocationNumber: 0,
    },
    role: "string",
    alias: "string",
});
Copy
type: oci:Blockchain:Peer
properties:
    ad: string
    alias: string
    blockchainPlatformId: string
    ocpuAllocationParam:
        ocpuAllocationNumber: 0
    role: string
Copy

Peer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Peer resource accepts the following input properties:

Ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new peer
BlockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
OcpuAllocationParam This property is required. PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
Role
This property is required.
Changes to this property will trigger replacement.
string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Alias Changes to this property will trigger replacement. string
peer alias
Ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new peer
BlockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
OcpuAllocationParam This property is required. PeerOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
Role
This property is required.
Changes to this property will trigger replacement.
string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Alias Changes to this property will trigger replacement. string
peer alias
ad
This property is required.
Changes to this property will trigger replacement.
String
Availability Domain to place new peer
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
String
Unique service identifier.
ocpuAllocationParam This property is required. PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
role
This property is required.
Changes to this property will trigger replacement.
String

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

alias Changes to this property will trigger replacement. String
peer alias
ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new peer
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
ocpuAllocationParam This property is required. PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
role
This property is required.
Changes to this property will trigger replacement.
string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

alias Changes to this property will trigger replacement. string
peer alias
ad
This property is required.
Changes to this property will trigger replacement.
str
Availability Domain to place new peer
blockchain_platform_id
This property is required.
Changes to this property will trigger replacement.
str
Unique service identifier.
ocpu_allocation_param This property is required. blockchain.PeerOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
role
This property is required.
Changes to this property will trigger replacement.
str

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

alias Changes to this property will trigger replacement. str
peer alias
ad
This property is required.
Changes to this property will trigger replacement.
String
Availability Domain to place new peer
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
String
Unique service identifier.
ocpuAllocationParam This property is required. Property Map
(Updatable) OCPU allocation parameter
role
This property is required.
Changes to this property will trigger replacement.
String

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

alias Changes to this property will trigger replacement. String
peer alias

Outputs

All input properties are implicitly available as output properties. Additionally, the Peer resource produces the following output properties:

Host string
Host on which the Peer exists
Id string
The provider-assigned unique ID for this managed resource.
PeerKey string
peer identifier
State string
The current state of the peer.
Host string
Host on which the Peer exists
Id string
The provider-assigned unique ID for this managed resource.
PeerKey string
peer identifier
State string
The current state of the peer.
host String
Host on which the Peer exists
id String
The provider-assigned unique ID for this managed resource.
peerKey String
peer identifier
state String
The current state of the peer.
host string
Host on which the Peer exists
id string
The provider-assigned unique ID for this managed resource.
peerKey string
peer identifier
state string
The current state of the peer.
host str
Host on which the Peer exists
id str
The provider-assigned unique ID for this managed resource.
peer_key str
peer identifier
state str
The current state of the peer.
host String
Host on which the Peer exists
id String
The provider-assigned unique ID for this managed resource.
peerKey String
peer identifier
state String
The current state of the peer.

Look up Existing Peer Resource

Get an existing Peer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PeerState, opts?: CustomResourceOptions): Peer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ad: Optional[str] = None,
        alias: Optional[str] = None,
        blockchain_platform_id: Optional[str] = None,
        host: Optional[str] = None,
        ocpu_allocation_param: Optional[_blockchain.PeerOcpuAllocationParamArgs] = None,
        peer_key: Optional[str] = None,
        role: Optional[str] = None,
        state: Optional[str] = None) -> Peer
func GetPeer(ctx *Context, name string, id IDInput, state *PeerState, opts ...ResourceOption) (*Peer, error)
public static Peer Get(string name, Input<string> id, PeerState? state, CustomResourceOptions? opts = null)
public static Peer get(String name, Output<String> id, PeerState state, CustomResourceOptions options)
resources:  _:    type: oci:Blockchain:Peer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Ad Changes to this property will trigger replacement. string
Availability Domain to place new peer
Alias Changes to this property will trigger replacement. string
peer alias
BlockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
Host string
Host on which the Peer exists
OcpuAllocationParam PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
PeerKey string
peer identifier
Role Changes to this property will trigger replacement. string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

State string
The current state of the peer.
Ad Changes to this property will trigger replacement. string
Availability Domain to place new peer
Alias Changes to this property will trigger replacement. string
peer alias
BlockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
Host string
Host on which the Peer exists
OcpuAllocationParam PeerOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
PeerKey string
peer identifier
Role Changes to this property will trigger replacement. string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

State string
The current state of the peer.
ad Changes to this property will trigger replacement. String
Availability Domain to place new peer
alias Changes to this property will trigger replacement. String
peer alias
blockchainPlatformId Changes to this property will trigger replacement. String
Unique service identifier.
host String
Host on which the Peer exists
ocpuAllocationParam PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
peerKey String
peer identifier
role Changes to this property will trigger replacement. String

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

state String
The current state of the peer.
ad Changes to this property will trigger replacement. string
Availability Domain to place new peer
alias Changes to this property will trigger replacement. string
peer alias
blockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
host string
Host on which the Peer exists
ocpuAllocationParam PeerOcpuAllocationParam
(Updatable) OCPU allocation parameter
peerKey string
peer identifier
role Changes to this property will trigger replacement. string

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

state string
The current state of the peer.
ad Changes to this property will trigger replacement. str
Availability Domain to place new peer
alias Changes to this property will trigger replacement. str
peer alias
blockchain_platform_id Changes to this property will trigger replacement. str
Unique service identifier.
host str
Host on which the Peer exists
ocpu_allocation_param blockchain.PeerOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
peer_key str
peer identifier
role Changes to this property will trigger replacement. str

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

state str
The current state of the peer.
ad Changes to this property will trigger replacement. String
Availability Domain to place new peer
alias Changes to this property will trigger replacement. String
peer alias
blockchainPlatformId Changes to this property will trigger replacement. String
Unique service identifier.
host String
Host on which the Peer exists
ocpuAllocationParam Property Map
(Updatable) OCPU allocation parameter
peerKey String
peer identifier
role Changes to this property will trigger replacement. String

Peer role

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

state String
The current state of the peer.

Supporting Types

PeerOcpuAllocationParam
, PeerOcpuAllocationParamArgs

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

Import

Peers can be imported using the id, e.g.

$ pulumi import oci:Blockchain/peer:Peer test_peer "blockchainPlatforms/{blockchainPlatformId}/peers/{peerId}"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.