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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testPeer = new Oci.Blockchain.Peer("testPeer", new()
{
Ad = @var.Peer_ad,
BlockchainPlatformId = oci_blockchain_blockchain_platform.Test_blockchain_platform.Id,
OcpuAllocationParam = new Oci.Blockchain.Inputs.PeerOcpuAllocationParamArgs
{
OcpuAllocationNumber = @var.Peer_ocpu_allocation_param_ocpu_allocation_number,
},
Role = @var.Peer_role,
Alias = @var.Peer_alias,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Blockchain"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Blockchain.NewPeer(ctx, "testPeer", &Blockchain.PeerArgs{
Ad: pulumi.Any(_var.Peer_ad),
BlockchainPlatformId: pulumi.Any(oci_blockchain_blockchain_platform.Test_blockchain_platform.Id),
OcpuAllocationParam: &blockchain.PeerOcpuAllocationParamArgs{
OcpuAllocationNumber: pulumi.Any(_var.Peer_ocpu_allocation_param_ocpu_allocation_number),
},
Role: pulumi.Any(_var.Peer_role),
Alias: pulumi.Any(_var.Peer_alias),
})
if err != nil {
return err
}
return nil
})
}
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(var_.peer_ad())
.blockchainPlatformId(oci_blockchain_blockchain_platform.test_blockchain_platform().id())
.ocpuAllocationParam(PeerOcpuAllocationParamArgs.builder()
.ocpuAllocationNumber(var_.peer_ocpu_allocation_param_ocpu_allocation_number())
.build())
.role(var_.peer_role())
.alias(var_.peer_alias())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_peer = oci.blockchain.Peer("testPeer",
ad=var["peer_ad"],
blockchain_platform_id=oci_blockchain_blockchain_platform["test_blockchain_platform"]["id"],
ocpu_allocation_param=oci.blockchain.PeerOcpuAllocationParamArgs(
ocpu_allocation_number=var["peer_ocpu_allocation_param_ocpu_allocation_number"],
),
role=var["peer_role"],
alias=var["peer_alias"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testPeer = new oci.blockchain.Peer("testPeer", {
ad: _var.peer_ad,
blockchainPlatformId: oci_blockchain_blockchain_platform.test_blockchain_platform.id,
ocpuAllocationParam: {
ocpuAllocationNumber: _var.peer_ocpu_allocation_param_ocpu_allocation_number,
},
role: _var.peer_role,
alias: _var.peer_alias,
});
resources:
testPeer:
type: oci:Blockchain:Peer
properties:
#Required
ad: ${var.peer_ad}
blockchainPlatformId: ${oci_blockchain_blockchain_platform.test_blockchain_platform.id}
ocpuAllocationParam:
ocpuAllocationNumber: ${var.peer_ocpu_allocation_param_ocpu_allocation_number}
role: ${var.peer_role}
#Optional
alias: ${var.peer_alias}
Create Peer Resource
new Peer(name: string, args: PeerArgs, opts?: CustomResourceOptions);
@overload
def Peer(resource_name: str,
opts: Optional[ResourceOptions] = None,
ad: Optional[str] = None,
alias: Optional[str] = None,
blockchain_platform_id: Optional[str] = None,
ocpu_allocation_param: Optional[_blockchain.PeerOcpuAllocationParamArgs] = None,
role: Optional[str] = None)
@overload
def Peer(resource_name: str,
args: PeerArgs,
opts: Optional[ResourceOptions] = None)
func NewPeer(ctx *Context, name string, args PeerArgs, opts ...ResourceOption) (*Peer, error)
public Peer(string name, PeerArgs args, CustomResourceOptions? opts = null)
type: oci:Blockchain:Peer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args PeerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PeerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
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
The Peer resource accepts the following input properties:
- Ad string
Availability Domain to place new peer
- Blockchain
Platform stringId Unique service identifier.
- Ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- Role 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 string
peer alias
- Ad string
Availability Domain to place new peer
- Blockchain
Platform stringId Unique service identifier.
- Ocpu
Allocation PeerParam Ocpu Allocation Param Args (Updatable) OCPU allocation parameter
- Role 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 string
peer alias
- ad String
Availability Domain to place new peer
- blockchain
Platform StringId Unique service identifier.
- ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- role 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 String
peer alias
- ad string
Availability Domain to place new peer
- blockchain
Platform stringId Unique service identifier.
- ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- role 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 string
peer alias
- ad str
Availability Domain to place new peer
- blockchain_
platform_ strid Unique service identifier.
- ocpu_
allocation_ Peerparam Ocpu Allocation Param Args (Updatable) OCPU allocation parameter
- role 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 str
peer alias
- ad String
Availability Domain to place new peer
- blockchain
Platform StringId Unique service identifier.
- ocpu
Allocation Property MapParam (Updatable) OCPU allocation parameter
- role 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 String
peer alias
Outputs
All input properties are implicitly available as output properties. Additionally, the Peer resource produces the following output properties:
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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Ad string
Availability Domain to place new peer
- Alias string
peer alias
- Blockchain
Platform stringId Unique service identifier.
- Host string
Host on which the Peer exists
- Ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- Peer
Key string peer identifier
- Role 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 string
Availability Domain to place new peer
- Alias string
peer alias
- Blockchain
Platform stringId Unique service identifier.
- Host string
Host on which the Peer exists
- Ocpu
Allocation PeerParam Ocpu Allocation Param Args (Updatable) OCPU allocation parameter
- Peer
Key string peer identifier
- Role 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 String
Availability Domain to place new peer
- alias String
peer alias
- blockchain
Platform StringId Unique service identifier.
- host String
Host on which the Peer exists
- ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- peer
Key String peer identifier
- role 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 string
Availability Domain to place new peer
- alias string
peer alias
- blockchain
Platform stringId Unique service identifier.
- host string
Host on which the Peer exists
- ocpu
Allocation PeerParam Ocpu Allocation Param (Updatable) OCPU allocation parameter
- peer
Key string peer identifier
- role 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 str
Availability Domain to place new peer
- alias str
peer alias
- blockchain_
platform_ strid Unique service identifier.
- host str
Host on which the Peer exists
- ocpu_
allocation_ Peerparam Ocpu Allocation Param Args (Updatable) OCPU allocation parameter
- peer_
key str peer identifier
- role 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 String
Availability Domain to place new peer
- alias String
peer alias
- blockchain
Platform StringId Unique service identifier.
- host String
Host on which the Peer exists
- ocpu
Allocation Property MapParam (Updatable) OCPU allocation parameter
- peer
Key String peer identifier
- role 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
- Ocpu
Allocation doubleNumber (Updatable) Number of OCPU allocation
- Ocpu
Allocation float64Number (Updatable) Number of OCPU allocation
- ocpu
Allocation DoubleNumber (Updatable) Number of OCPU allocation
- ocpu
Allocation numberNumber (Updatable) Number of OCPU allocation
- ocpu_
allocation_ floatnumber (Updatable) Number of OCPU allocation
- ocpu
Allocation NumberNumber (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}"
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.