1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. Peer
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

oci.Blockchain.Peer

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

    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)
    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.
    
    
    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

    BlockchainPlatformId string

    Unique service identifier.

    OcpuAllocationParam PeerOcpuAllocationParam

    (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

    BlockchainPlatformId string

    Unique service identifier.

    OcpuAllocationParam PeerOcpuAllocationParamArgs

    (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

    blockchainPlatformId String

    Unique service identifier.

    ocpuAllocationParam PeerOcpuAllocationParam

    (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

    blockchainPlatformId string

    Unique service identifier.

    ocpuAllocationParam PeerOcpuAllocationParam

    (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_id str

    Unique service identifier.

    ocpu_allocation_param PeerOcpuAllocationParamArgs

    (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

    blockchainPlatformId String

    Unique service identifier.

    ocpuAllocationParam Property Map

    (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:

    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)
    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.
    The following state arguments are supported:
    Ad string

    Availability Domain to place new peer

    Alias string

    peer alias

    BlockchainPlatformId string

    Unique service identifier.

    Host string

    Host on which the Peer exists

    OcpuAllocationParam PeerOcpuAllocationParam

    (Updatable) OCPU allocation parameter

    PeerKey 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

    BlockchainPlatformId string

    Unique service identifier.

    Host string

    Host on which the Peer exists

    OcpuAllocationParam PeerOcpuAllocationParamArgs

    (Updatable) OCPU allocation parameter

    PeerKey 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

    blockchainPlatformId String

    Unique service identifier.

    host String

    Host on which the Peer exists

    ocpuAllocationParam PeerOcpuAllocationParam

    (Updatable) OCPU allocation parameter

    peerKey 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

    blockchainPlatformId string

    Unique service identifier.

    host string

    Host on which the Peer exists

    ocpuAllocationParam PeerOcpuAllocationParam

    (Updatable) OCPU allocation parameter

    peerKey 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_id str

    Unique service identifier.

    host str

    Host on which the Peer exists

    ocpu_allocation_param PeerOcpuAllocationParamArgs

    (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

    blockchainPlatformId String

    Unique service identifier.

    host String

    Host on which the Peer exists

    ocpuAllocationParam Property Map

    (Updatable) OCPU allocation parameter

    peerKey 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

    OcpuAllocationNumber double

    (Updatable) Number of OCPU allocation

    OcpuAllocationNumber float64

    (Updatable) Number of OCPU allocation

    ocpuAllocationNumber Double

    (Updatable) Number of OCPU allocation

    ocpuAllocationNumber number

    (Updatable) Number of OCPU allocation

    ocpu_allocation_number float

    (Updatable) Number of OCPU allocation

    ocpuAllocationNumber 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}"
    

    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 v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi