Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.Blockchain.getOsn
Explore with Pulumi AI
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,
});
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"])
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
	})
}
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,
    });
});
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());
    }
}
variables:
  testOsn:
    fn::invoke:
      function: oci:Blockchain:getOsn
      arguments:
        blockchainPlatformId: ${testBlockchainPlatform.id}
        osnId: ${testOsnOciBlockchainOsn.id}
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>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]func GetOsn(ctx *Context, args *GetOsnArgs, opts ...InvokeOption) (*GetOsnResult, error)
func GetOsnOutput(ctx *Context, args *GetOsnOutputArgs, opts ...InvokeOption) GetOsnResultOutput> 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)
}public static CompletableFuture<GetOsnResult> getOsn(GetOsnArgs args, InvokeOptions options)
public static Output<GetOsnResult> getOsn(GetOsnArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Blockchain/getOsn:getOsn
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BlockchainPlatform stringId 
- Unique service identifier.
- OsnId string
- OSN identifier.
- BlockchainPlatform stringId 
- Unique service identifier.
- OsnId string
- OSN identifier.
- blockchainPlatform StringId 
- Unique service identifier.
- osnId String
- OSN identifier.
- blockchainPlatform stringId 
- Unique service identifier.
- osnId string
- OSN identifier.
- blockchain_platform_ strid 
- Unique service identifier.
- osn_id str
- OSN identifier.
- blockchainPlatform StringId 
- Unique service identifier.
- osnId String
- OSN identifier.
getOsn Result
The following output properties are available:
- Ad string
- Availability Domain of OSN
- BlockchainPlatform stringId 
- Id string
- OcpuAllocation List<GetParams Osn Ocpu Allocation Param> 
- OCPU allocation parameter
- OsnId string
- OsnKey string
- OSN identifier
- State string
- The current state of the OSN.
- Ad string
- Availability Domain of OSN
- BlockchainPlatform stringId 
- Id string
- OcpuAllocation []GetParams Osn Ocpu Allocation Param 
- OCPU allocation parameter
- OsnId string
- OsnKey string
- OSN identifier
- State string
- The current state of the OSN.
- ad String
- Availability Domain of OSN
- blockchainPlatform StringId 
- id String
- ocpuAllocation List<GetParams Osn Ocpu Allocation Param> 
- OCPU allocation parameter
- osnId String
- osnKey String
- OSN identifier
- state String
- The current state of the OSN.
- ad string
- Availability Domain of OSN
- blockchainPlatform stringId 
- id string
- ocpuAllocation GetParams Osn Ocpu Allocation Param[] 
- 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_ strid 
- id str
- ocpu_allocation_ Sequence[blockchain.params Get Osn Ocpu Allocation Param] 
- 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
- blockchainPlatform StringId 
- id String
- ocpuAllocation List<Property Map>Params 
- OCPU allocation parameter
- osnId String
- osnKey String
- OSN identifier
- state String
- The current state of the OSN.
Supporting Types
GetOsnOcpuAllocationParam    
- OcpuAllocation doubleNumber 
- Number of OCPU allocation
- OcpuAllocation float64Number 
- Number of OCPU allocation
- ocpuAllocation DoubleNumber 
- Number of OCPU allocation
- ocpuAllocation numberNumber 
- Number of OCPU allocation
- ocpu_allocation_ floatnumber 
- Number of OCPU allocation
- ocpuAllocation NumberNumber 
- Number of OCPU allocation
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.