Create an Image List Entry

post

/imagelist/{name}/entry/

Adds an image list entry to Compute Classic. Each machine image in an image list is identified by an image list entry.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Path Parameters
  • Three-part name of the image list (/Compute-identity_domain/user/object).

Header Parameters
Body ()
The request body contains details of the image list entry that you want to create.
Root Schema : ImageListEntry-post-request
Type: object
The request body contains details of the image list entry that you want to create.
Show Source
  • attributes
    Additional Properties Allowed: additionalProperties

    User-defined parameters, in JSON format, that can be passed to an instance of this machine image when it is launched. This field can be used, for example, to specify a user-friendly name for the image list in the displayName attribute. The name you specify is displayed as the name of the image list in the Compute Classic web console. Instance metadata, including user-defined data is available at http://192.0.0.192/ within an instance. See Retrieving User-Defined Instance Attributes in Using Oracle Cloud Infrastructure Compute Classic.

  • machineimages

    A list of machine images. Specify the three-part name of each machine image.

  • The unique version of the entry in the image list.
Nested Schema : attributes
Type: object
Additional Properties Allowed
Show Source

User-defined parameters, in JSON format, that can be passed to an instance of this machine image when it is launched. This field can be used, for example, to specify a user-friendly name for the image list in the displayName attribute. The name you specify is displayed as the name of the image list in the Compute Classic web console. Instance metadata, including user-defined data is available at http://192.0.0.192/ within an instance. See Retrieving User-Defined Instance Attributes in Using Oracle Cloud Infrastructure Compute Classic.

Nested Schema : machineimages
Type: array

A list of machine images. Specify the three-part name of each machine image.

Show Source
Nested Schema : additionalProperties
Type: object
Back to Top

Response

Supported Media Types

201 Response

Created. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : ImageListEntry-response
Type: object
Show Source
Nested Schema : attributes
Type: object
Additional Properties Allowed
Show Source

User-defined parameters, in JSON format, that can be passed to an instance of this machine image when it is launched. This field can be used, for example, to specify a user-friendly name for the image list in the displayName attribute. The name you specify is displayed as the name of the image list in the Compute Classic web console. Instance metadata, including user-defined data is available at http://192.0.0.192/ within an instance. See Retrieving User-Defined Instance Attributes in Using Oracle Cloud Infrastructure Compute Classic.

Nested Schema : machineimages
Type: array

A list of machine images. Specify the three-part name of each machine image.

Show Source
Nested Schema : additionalProperties
Type: object
Back to Top

Examples

cURL Command

The following example shows how to add an image list entry to an image list by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/imagelist/Compute-acme/jack.jones@example.com/ol6/entry/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file.

{
  "attributes": {"type": "Oracle Linux 6.6"}, 
  "version": 2, 
  "machineimages": ["/Compute-acme/jack.jones@example.com/ol66_40GB"], 
}

Example of Response Body

The following example shows the response body in JSON format.

Some lines may be truncated with ellipses (...) for readability.

{
   "attributes": {"type": "Oracle Linux 6.6"},
   "imagelist": {
    "default": 1,
    "description": null,
    "entries": null,
    "uri": "imagelist/Compute-acme/jack.jones@example.com/ol6",
    "name": "/Compute-acme/jack.jones@example.com/ol6"
   },
   "version": 2,
   "machineimages": ["/Compute-acme/jack.jones@example.com/ol66_40GB"],
   "uri": "https://api-z999.compute.us0.oraclecloud.com/imagelist/Compute-acme/jack.jones@example.com/ol6/entry/2"
}
Back to Top