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,
});
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)
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
})
}
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,
});
});
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());
}
}
resources:
testPeer:
type: oci:Blockchain:Peer
name: test_peer
properties:
ad: ${peerAd}
blockchainPlatformId: ${testBlockchainPlatform.id}
ocpuAllocationParam:
ocpuAllocationNumber: ${peerOcpuAllocationParamOcpuAllocationNumber}
role: ${peerRole}
alias: ${peerAlias}
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)
type: oci:Blockchain:Peer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
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",
});
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"),
})
var peerResource = new Peer("peerResource", PeerArgs.builder()
.ad("string")
.blockchainPlatformId("string")
.ocpuAllocationParam(PeerOcpuAllocationParamArgs.builder()
.ocpuAllocationNumber(0)
.build())
.role("string")
.alias("string")
.build());
peer_resource = oci.blockchain.Peer("peerResource",
ad="string",
blockchain_platform_id="string",
ocpu_allocation_param=oci.blockchain.PeerOcpuAllocationParamArgs(
ocpu_allocation_number=0,
),
role="string",
alias="string")
const peerResource = new oci.blockchain.Peer("peerResource", {
ad: "string",
blockchainPlatformId: "string",
ocpuAllocationParam: {
ocpuAllocationNumber: 0,
},
role: "string",
alias: "string",
});
type: oci:Blockchain:Peer
properties:
ad: string
alias: string
blockchainPlatformId: string
ocpuAllocationParam:
ocpuAllocationNumber: 0
role: string
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_ blockchain.param Peer 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_ blockchain.param Peer 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}"
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.