1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Blockchain
  5. Osn
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Blockchain.Osn

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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,
        },
    });
    
    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,
        })
    
    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
    	})
    }
    
    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,
            },
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      testOsn:
        type: oci:Blockchain:Osn
        name: test_osn
        properties:
          ad: ${osnAd}
          blockchainPlatformId: ${testBlockchainPlatform.id}
          ocpuAllocationParam:
            ocpuAllocationNumber: ${osnOcpuAllocationParamOcpuAllocationNumber}
    

    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 string
    The unique name of the resource.
    args OsnArgs
    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 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 string
    The unique name of the resource.
    args OsnArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OsnArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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,
        },
    });
    
    example, err := Blockchain.NewOsn(ctx, "osnResource", &Blockchain.OsnArgs{
    	Ad:                   pulumi.String("string"),
    	BlockchainPlatformId: pulumi.String("string"),
    	OcpuAllocationParam: &blockchain.OsnOcpuAllocationParamArgs{
    		OcpuAllocationNumber: pulumi.Float64(0),
    	},
    })
    
    var osnResource = new Osn("osnResource", OsnArgs.builder()
        .ad("string")
        .blockchainPlatformId("string")
        .ocpuAllocationParam(OsnOcpuAllocationParamArgs.builder()
            .ocpuAllocationNumber(0)
            .build())
        .build());
    
    osn_resource = oci.blockchain.Osn("osnResource",
        ad="string",
        blockchain_platform_id="string",
        ocpu_allocation_param={
            "ocpu_allocation_number": 0,
        })
    
    const osnResource = new oci.blockchain.Osn("osnResource", {
        ad: "string",
        blockchainPlatformId: "string",
        ocpuAllocationParam: {
            ocpuAllocationNumber: 0,
        },
    });
    
    type: oci:Blockchain:Osn
    properties:
        ad: string
        blockchainPlatformId: string
        ocpuAllocationParam:
            ocpuAllocationNumber: 0
    

    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 string
    Availability Domain to place new OSN
    BlockchainPlatformId string
    Unique service identifier.
    OcpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    Ad string
    Availability Domain to place new OSN
    BlockchainPlatformId string
    Unique service identifier.
    OcpuAllocationParam OsnOcpuAllocationParamArgs
    (Updatable) OCPU allocation parameter
    ad String
    Availability Domain to place new OSN
    blockchainPlatformId String
    Unique service identifier.
    ocpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    ad string
    Availability Domain to place new OSN
    blockchainPlatformId string
    Unique service identifier.
    ocpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    ad str
    Availability Domain to place new OSN
    blockchain_platform_id str
    Unique service identifier.
    ocpu_allocation_param blockchain.OsnOcpuAllocationParamArgs
    (Updatable) OCPU allocation parameter
    ad String
    Availability Domain to place new OSN
    blockchainPlatformId 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)
    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 OSN
    BlockchainPlatformId string
    Unique service identifier.
    OcpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    OsnKey string
    OSN identifier
    State string
    The current state of the OSN.
    Ad string
    Availability Domain to place new OSN
    BlockchainPlatformId string
    Unique service identifier.
    OcpuAllocationParam OsnOcpuAllocationParamArgs
    (Updatable) OCPU allocation parameter
    OsnKey string
    OSN identifier
    State string
    The current state of the OSN.
    ad String
    Availability Domain to place new OSN
    blockchainPlatformId String
    Unique service identifier.
    ocpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    osnKey String
    OSN identifier
    state String
    The current state of the OSN.
    ad string
    Availability Domain to place new OSN
    blockchainPlatformId string
    Unique service identifier.
    ocpuAllocationParam OsnOcpuAllocationParam
    (Updatable) OCPU allocation parameter
    osnKey string
    OSN identifier
    state string
    The current state of the OSN.
    ad str
    Availability Domain to place new OSN
    blockchain_platform_id 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 String
    Availability Domain to place new OSN
    blockchainPlatformId 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 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 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 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 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 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 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}"
    

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi