philip
philip

Reputation: 41

Example of LaunchInstance with InstanceSourceDetails interface

I am looking for an implementation example of LaunchInstanceRequest with the SourceDetails field when it is asking for an interface.

instanceRequest := core.LaunchInstanceRequest{}
instanceRequest.SourceDetails = ...

I am referring to the following for documentation.

https://godoc.org/github.com/oracle/oci-go-sdk/core#LaunchInstanceRequest

Upvotes: 1

Views: 171

Answers (1)

philip
philip

Reputation: 41

One such example would be to do the following

var instanceSD core.InstanceSourceDetails = core.InstanceSourceViaImageDetails{
    ImageId:             common.String("ocid1.image.oc1.iad.aaaaaaaa2tq67tvbeavcmioghquci6p3pvqwbneq3vfy7fe7m7geiga4cnxa"),
    BootVolumeSizeInGBs: common.Int64(50),
}

instanceRequest.SourceDetails = instanceSD

Upvotes: 1

Related Questions