1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. Peer
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

oci.Blockchain.Peer

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

    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=oci.blockchain.PeerOcpuAllocationParamArgs(
            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)
    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 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
    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 blockchain.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 blockchain.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}"
    

    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.
    oci logo
    Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi