1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. Osn
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.Blockchain.Osn

Explore with Pulumi AI

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

Create Blockchain Platform Osn

Example Usage

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

const testOsn = new oci.blockchain.Osn("test_osn", {
    ad: osnAd,
    blockchainPlatformId: testBlockchainPlatform.id,
    ocpuAllocationParam: {
        ocpuAllocationNumber: osnOcpuAllocationParamOcpuAllocationNumber,
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_osn = oci.blockchain.Osn("test_osn",
    ad=osn_ad,
    blockchain_platform_id=test_blockchain_platform["id"],
    ocpu_allocation_param={
        "ocpu_allocation_number": osn_ocpu_allocation_param_ocpu_allocation_number,
    })
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.NewOsn(ctx, "test_osn", &blockchain.OsnArgs{
			Ad:                   pulumi.Any(osnAd),
			BlockchainPlatformId: pulumi.Any(testBlockchainPlatform.Id),
			OcpuAllocationParam: &blockchain.OsnOcpuAllocationParamArgs{
				OcpuAllocationNumber: pulumi.Any(osnOcpuAllocationParamOcpuAllocationNumber),
			},
		})
		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 testOsn = new Oci.Blockchain.Osn("test_osn", new()
    {
        Ad = osnAd,
        BlockchainPlatformId = testBlockchainPlatform.Id,
        OcpuAllocationParam = new Oci.Blockchain.Inputs.OsnOcpuAllocationParamArgs
        {
            OcpuAllocationNumber = osnOcpuAllocationParamOcpuAllocationNumber,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Blockchain.Osn;
import com.pulumi.oci.Blockchain.OsnArgs;
import com.pulumi.oci.Blockchain.inputs.OsnOcpuAllocationParamArgs;
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 testOsn = new Osn("testOsn", OsnArgs.builder()
            .ad(osnAd)
            .blockchainPlatformId(testBlockchainPlatform.id())
            .ocpuAllocationParam(OsnOcpuAllocationParamArgs.builder()
                .ocpuAllocationNumber(osnOcpuAllocationParamOcpuAllocationNumber)
                .build())
            .build());

    }
}
Copy
resources:
  testOsn:
    type: oci:Blockchain:Osn
    name: test_osn
    properties:
      ad: ${osnAd}
      blockchainPlatformId: ${testBlockchainPlatform.id}
      ocpuAllocationParam:
        ocpuAllocationNumber: ${osnOcpuAllocationParamOcpuAllocationNumber}
Copy

Create Osn Resource

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

Constructor syntax

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

@overload
def Osn(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        ad: Optional[str] = None,
        blockchain_platform_id: Optional[str] = None,
        ocpu_allocation_param: Optional[_blockchain.OsnOcpuAllocationParamArgs] = None)
func NewOsn(ctx *Context, name string, args OsnArgs, opts ...ResourceOption) (*Osn, error)
public Osn(string name, OsnArgs args, CustomResourceOptions? opts = null)
public Osn(String name, OsnArgs args)
public Osn(String name, OsnArgs args, CustomResourceOptions options)
type: oci:Blockchain:Osn
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. OsnArgs
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. OsnArgs
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. OsnArgs
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. OsnArgs
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. OsnArgs
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 osnResource = new Oci.Blockchain.Osn("osnResource", new()
{
    Ad = "string",
    BlockchainPlatformId = "string",
    OcpuAllocationParam = new Oci.Blockchain.Inputs.OsnOcpuAllocationParamArgs
    {
        OcpuAllocationNumber = 0,
    },
});
Copy
example, err := Blockchain.NewOsn(ctx, "osnResource", &Blockchain.OsnArgs{
	Ad:                   pulumi.String("string"),
	BlockchainPlatformId: pulumi.String("string"),
	OcpuAllocationParam: &blockchain.OsnOcpuAllocationParamArgs{
		OcpuAllocationNumber: pulumi.Float64(0),
	},
})
Copy
var osnResource = new Osn("osnResource", OsnArgs.builder()
    .ad("string")
    .blockchainPlatformId("string")
    .ocpuAllocationParam(OsnOcpuAllocationParamArgs.builder()
        .ocpuAllocationNumber(0)
        .build())
    .build());
Copy
osn_resource = oci.blockchain.Osn("osnResource",
    ad="string",
    blockchain_platform_id="string",
    ocpu_allocation_param={
        "ocpu_allocation_number": 0,
    })
Copy
const osnResource = new oci.blockchain.Osn("osnResource", {
    ad: "string",
    blockchainPlatformId: "string",
    ocpuAllocationParam: {
        ocpuAllocationNumber: 0,
    },
});
Copy
type: oci:Blockchain:Osn
properties:
    ad: string
    blockchainPlatformId: string
    ocpuAllocationParam:
        ocpuAllocationNumber: 0
Copy

Osn 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 Osn resource accepts the following input properties:

Ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new OSN
BlockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
OcpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
Ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new OSN
BlockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
OcpuAllocationParam OsnOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
ad
This property is required.
Changes to this property will trigger replacement.
String
Availability Domain to place new OSN
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
String
Unique service identifier.
ocpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
ad
This property is required.
Changes to this property will trigger replacement.
string
Availability Domain to place new OSN
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
string
Unique service identifier.
ocpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
ad
This property is required.
Changes to this property will trigger replacement.
str
Availability Domain to place new OSN
blockchain_platform_id
This property is required.
Changes to this property will trigger replacement.
str
Unique service identifier.
ocpu_allocation_param blockchain.OsnOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
ad
This property is required.
Changes to this property will trigger replacement.
String
Availability Domain to place new OSN
blockchainPlatformId
This property is required.
Changes to this property will trigger replacement.
String
Unique service identifier.
ocpuAllocationParam Property Map
(Updatable) OCPU allocation parameter

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
OsnKey string
OSN identifier
State string
The current state of the OSN.
Id string
The provider-assigned unique ID for this managed resource.
OsnKey string
OSN identifier
State string
The current state of the OSN.
id String
The provider-assigned unique ID for this managed resource.
osnKey String
OSN identifier
state String
The current state of the OSN.
id string
The provider-assigned unique ID for this managed resource.
osnKey string
OSN identifier
state string
The current state of the OSN.
id str
The provider-assigned unique ID for this managed resource.
osn_key str
OSN identifier
state str
The current state of the OSN.
id String
The provider-assigned unique ID for this managed resource.
osnKey String
OSN identifier
state String
The current state of the OSN.

Look up Existing Osn Resource

Get an existing Osn 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?: OsnState, opts?: CustomResourceOptions): Osn
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ad: Optional[str] = None,
        blockchain_platform_id: Optional[str] = None,
        ocpu_allocation_param: Optional[_blockchain.OsnOcpuAllocationParamArgs] = None,
        osn_key: Optional[str] = None,
        state: Optional[str] = None) -> Osn
func GetOsn(ctx *Context, name string, id IDInput, state *OsnState, opts ...ResourceOption) (*Osn, error)
public static Osn Get(string name, Input<string> id, OsnState? state, CustomResourceOptions? opts = null)
public static Osn get(String name, Output<String> id, OsnState state, CustomResourceOptions options)
resources:  _:    type: oci:Blockchain:Osn    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 OSN
BlockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
OcpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
OsnKey string
OSN identifier
State string
The current state of the OSN.
Ad Changes to this property will trigger replacement. string
Availability Domain to place new OSN
BlockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
OcpuAllocationParam OsnOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
OsnKey string
OSN identifier
State string
The current state of the OSN.
ad Changes to this property will trigger replacement. String
Availability Domain to place new OSN
blockchainPlatformId Changes to this property will trigger replacement. String
Unique service identifier.
ocpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
osnKey String
OSN identifier
state String
The current state of the OSN.
ad Changes to this property will trigger replacement. string
Availability Domain to place new OSN
blockchainPlatformId Changes to this property will trigger replacement. string
Unique service identifier.
ocpuAllocationParam OsnOcpuAllocationParam
(Updatable) OCPU allocation parameter
osnKey string
OSN identifier
state string
The current state of the OSN.
ad Changes to this property will trigger replacement. str
Availability Domain to place new OSN
blockchain_platform_id Changes to this property will trigger replacement. str
Unique service identifier.
ocpu_allocation_param blockchain.OsnOcpuAllocationParamArgs
(Updatable) OCPU allocation parameter
osn_key str
OSN identifier
state str
The current state of the OSN.
ad Changes to this property will trigger replacement. String
Availability Domain to place new OSN
blockchainPlatformId Changes to this property will trigger replacement. String
Unique service identifier.
ocpuAllocationParam Property Map
(Updatable) OCPU allocation parameter
osnKey String
OSN identifier
state String
The current state of the OSN.

Supporting Types

OsnOcpuAllocationParam
, OsnOcpuAllocationParamArgs

OcpuAllocationNumber This property is required. double

(Updatable) Number of OCPU allocation

** 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

OcpuAllocationNumber This property is required. float64

(Updatable) Number of OCPU allocation

** 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

ocpuAllocationNumber This property is required. Double

(Updatable) Number of OCPU allocation

** 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

ocpuAllocationNumber This property is required. number

(Updatable) Number of OCPU allocation

** 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

ocpu_allocation_number This property is required. float

(Updatable) Number of OCPU allocation

** 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

ocpuAllocationNumber This property is required. Number

(Updatable) Number of OCPU allocation

** 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

Import

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

$ pulumi import oci:Blockchain/osn:Osn test_osn "blockchainPlatforms/{blockchainPlatformId}/osns/{osnId}"
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.