1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. getOsn
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Blockchain.getOsn

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides details about a specific Osn resource in Oracle Cloud Infrastructure Blockchain service.

Gets information about an OSN identified by the specific id

Example Usage

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

const testOsn = oci.Blockchain.getOsn({
    blockchainPlatformId: testBlockchainPlatform.id,
    osnId: testOsnOciBlockchainOsn.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_osn = oci.Blockchain.get_osn(blockchain_platform_id=test_blockchain_platform["id"],
    osn_id=test_osn_oci_blockchain_osn["id"])
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.GetOsn(ctx, &blockchain.GetOsnArgs{
			BlockchainPlatformId: testBlockchainPlatform.Id,
			OsnId:                testOsnOciBlockchainOsn.Id,
		}, nil)
		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 = Oci.Blockchain.GetOsn.Invoke(new()
    {
        BlockchainPlatformId = testBlockchainPlatform.Id,
        OsnId = testOsnOciBlockchainOsn.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Blockchain.BlockchainFunctions;
import com.pulumi.oci.Blockchain.inputs.GetOsnArgs;
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) {
        final var testOsn = BlockchainFunctions.getOsn(GetOsnArgs.builder()
            .blockchainPlatformId(testBlockchainPlatform.id())
            .osnId(testOsnOciBlockchainOsn.id())
            .build());

    }
}
Copy
variables:
  testOsn:
    fn::invoke:
      function: oci:Blockchain:getOsn
      arguments:
        blockchainPlatformId: ${testBlockchainPlatform.id}
        osnId: ${testOsnOciBlockchainOsn.id}
Copy

Using getOsn

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getOsn(args: GetOsnArgs, opts?: InvokeOptions): Promise<GetOsnResult>
function getOsnOutput(args: GetOsnOutputArgs, opts?: InvokeOptions): Output<GetOsnResult>
Copy
def get_osn(blockchain_platform_id: Optional[str] = None,
            osn_id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetOsnResult
def get_osn_output(blockchain_platform_id: Optional[pulumi.Input[str]] = None,
            osn_id: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetOsnResult]
Copy
func GetOsn(ctx *Context, args *GetOsnArgs, opts ...InvokeOption) (*GetOsnResult, error)
func GetOsnOutput(ctx *Context, args *GetOsnOutputArgs, opts ...InvokeOption) GetOsnResultOutput
Copy

> Note: This function is named GetOsn in the Go SDK.

public static class GetOsn 
{
    public static Task<GetOsnResult> InvokeAsync(GetOsnArgs args, InvokeOptions? opts = null)
    public static Output<GetOsnResult> Invoke(GetOsnInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOsnResult> getOsn(GetOsnArgs args, InvokeOptions options)
public static Output<GetOsnResult> getOsn(GetOsnArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Blockchain/getOsn:getOsn
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BlockchainPlatformId This property is required. string
Unique service identifier.
OsnId This property is required. string
OSN identifier.
BlockchainPlatformId This property is required. string
Unique service identifier.
OsnId This property is required. string
OSN identifier.
blockchainPlatformId This property is required. String
Unique service identifier.
osnId This property is required. String
OSN identifier.
blockchainPlatformId This property is required. string
Unique service identifier.
osnId This property is required. string
OSN identifier.
blockchain_platform_id This property is required. str
Unique service identifier.
osn_id This property is required. str
OSN identifier.
blockchainPlatformId This property is required. String
Unique service identifier.
osnId This property is required. String
OSN identifier.

getOsn Result

The following output properties are available:

Ad string
Availability Domain of OSN
BlockchainPlatformId string
Id string
OcpuAllocationParams List<GetOsnOcpuAllocationParam>
OCPU allocation parameter
OsnId string
OsnKey string
OSN identifier
State string
The current state of the OSN.
Ad string
Availability Domain of OSN
BlockchainPlatformId string
Id string
OcpuAllocationParams []GetOsnOcpuAllocationParam
OCPU allocation parameter
OsnId string
OsnKey string
OSN identifier
State string
The current state of the OSN.
ad String
Availability Domain of OSN
blockchainPlatformId String
id String
ocpuAllocationParams List<GetOsnOcpuAllocationParam>
OCPU allocation parameter
osnId String
osnKey String
OSN identifier
state String
The current state of the OSN.
ad string
Availability Domain of OSN
blockchainPlatformId string
id string
ocpuAllocationParams GetOsnOcpuAllocationParam[]
OCPU allocation parameter
osnId string
osnKey string
OSN identifier
state string
The current state of the OSN.
ad str
Availability Domain of OSN
blockchain_platform_id str
id str
ocpu_allocation_params Sequence[blockchain.GetOsnOcpuAllocationParam]
OCPU allocation parameter
osn_id str
osn_key str
OSN identifier
state str
The current state of the OSN.
ad String
Availability Domain of OSN
blockchainPlatformId String
id String
ocpuAllocationParams List<Property Map>
OCPU allocation parameter
osnId String
osnKey String
OSN identifier
state String
The current state of the OSN.

Supporting Types

GetOsnOcpuAllocationParam

OcpuAllocationNumber This property is required. double
Number of OCPU allocation
OcpuAllocationNumber This property is required. float64
Number of OCPU allocation
ocpuAllocationNumber This property is required. Double
Number of OCPU allocation
ocpuAllocationNumber This property is required. number
Number of OCPU allocation
ocpu_allocation_number This property is required. float
Number of OCPU allocation
ocpuAllocationNumber This property is required. Number
Number of OCPU allocation

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi