Create Partition

The Create Partition operation creates a partition with the given properties on the identified CPC.

HTTP method and URI

POST /api/cpcs/{cpc-id}/partitions

In this request, the URI variable {cpc-id} is the object ID of the CPC.

Request body contents

The request body is a JSON object with the following fields:

Field name Type Rqd/Opt Description
type String Enum Optional The value to be set as the partition's type property.
name String (1-64) Required The value to be set as the partition's name property.
description String (0-1024) Optional The value to be set as the partition's description property.
short-name String (8) Optional The value to be set as the partition's short-name property.
partition-id String (2) Required if autogenerate- partition-id is false The value to be set as the partition's partition-id property.
autogenerate-partition-id Boolean Optional The value to be set as the partition's autogenerate-partition-id property.
ifl-processors Integer Required if cp-processors is not provided The value to be set as the partition's ifl-processors property.
cp-processors Integer Required if ifl-processors is not provided The value to be set as the partition's cp-processors property.
processor-mode String Enum Optional The value to be set as the partition's processor-mode property.
initial-memory Integer Required The value to be set as the partition's initial-memory property.
maximum-memory Integer Required The value to be set as the partition's maximum-memory property.
reserve-resources Boolean Optional The value to be set as the partition's reserve-resources property.
boot-device String Enum Optional The value to be set as the partition's boot-device property.
boot-timeout Integer (60-600) Optional The value to be set as the partition's boot-timeout property.
boot-ftp-host String Required if boot-device is "ftp", "ftps" or "sftp" The value to be set as the partition's boot-ftp-host property.
boot-ftp-username String Required if boot-device is "ftp", "ftps" or "sftp" The value to be set as the partition's boot-ftp-username property.
boot-ftp-password String Required if boot-device is "ftp", "ftps" or "sftp" The value to be set as the partition's boot-ftp-password property.
boot-ftp-insfile String Required if boot-device is "ftp", "ftps" or "sftp" The value to be set as the partition's boot-ftp-insfile property.
boot-removable-media String Required if boot-device is "removable-media" The value to be set as the partition's boot-removable-media property.
boot-removable-media-type String Enum Required if boot-device is "removable-media" The value to be set as the partition's boot-removable-media-type property.
access-global-performance-data Boolean Optional The value to be set as the partition's access-global-performance-data property.
permit-cross-partition-commands Boolean Optional The value to be set as the partition's permit-cross-partition-commands property.
access-basic-counter-set Boolean Optional The value to be set as the partition's access-basic-counter-set property.
access-problem-state-counter-set Boolean Optional The value to be set as the partition's access-problem-state-counter-set property.
access-crypto-activity-counter-set Boolean Optional The value to be set as the partition's access-crypto-activity-counter-set property.
access-extended-counter-set Boolean Optional The value to be set as the partition's access-extended-counter-set property.
access-coprocessor-group-set Boolean Optional The value to be set as the partition's access-coprocessor-group-set property.
access-basic-sampling Boolean Optional The value to be set as the partition's access-basic-sampling property.
access-diagnostic-sampling Boolean Optional The value to be set as the partition's access-diagnostic-sampling property.
permit-des-key-import-functions Boolean Optional The value to be set as the partition's permit-des-key-import-functions property.
permit-aes-key-import-functions Boolean Optional The value to be set as the partition's permit-aes-key-import-functions property.
permit-ecc-key-import-functions Boolean Optional The value to be set as the partition's permit-ecc-key-import-functions property.
ssc-host-name String/ Hostname Required, if type is "ssc" The value to be set as the partition's ssc-host-name property.
ssc-ipv4-gateway String/ IPv4 Address Optional The value to be set as the partition's ssc-ipv4-gateway property.
ssc-ipv6-gateway String/ IPv6 Address Optional The value to be set as the partition's ssc-ipv6-gateway property.
ssc-dns-servers Array of String/ IPv4 or IPv6 Address Optional The value to be set as the partition's ssc-dns-servers property.
ssc-master-userid String Required, if type is "ssc" The value to be set as the partition's ssc-master-userid property.
ssc-master-pw String Required, if type is "ssc" The value to be set as the partition's ssc-master-pw property.
initial-ifl-processing-weight Integer (1-999) Optional The value to be set as the partition's initial-ifl-processing-weight property.
initial-cp-processing-weight Integer (1-999) Optional The value to be set as the partition's initial-cp-processing-weight property.
acceptable-status

Array of String Enum

Optional The value to be set as the partition's acceptable-status property.
cp-absolute-processor-capping Boolean Optional The value to be set as the partition's cp-absolute-processor-capping property.
cp-absolute-processor-capping-value Float Optional The value to be set as the partition's cp-absolute-processor-capping-value property.
cp-processing-weight-capped Boolean Optional The value to be set as the partition's cp-processing-weight-capped property.
ifl-absolute-processor-capping Boolean Optional The value to be set as the partition's ifl-absolute-processor-capping property.
ifl-absolute-processor-capping-value Float Optional The value to be set as the partition's ifl-absolute-processor-capping-value property.
ifl-processing-weight-capped Boolean Optional The value to be set as the partition's ifl-processing-weight-capped property.
maximum-cp-processing-weight Integer Optional The value to be set as the partition's maximum-cp-processing-weight property.
maximum-ifl-processing-weight Integer Optional The value to be set as the partition's maximum-ifl-processing-weight property.
minimum-cp-processing-weight Integer Optional The value to be set as the partition's minimum-cp-processing-weight property.
minimum-ifl-processing-weight Integer Optional The value to be set as the partition's minimum-ifl-processing-weight property.
processor-management-enabled Boolean Optional The value to be set as the partition's processor-management-enabled property.

Response body contents

On successful completion, the response body is a JSON object with the following fields:

Field name Type Description
object-uri String/ URI The object-uri property of the created partition.

Description

This operation creates a partition with the values specified on the identified CPC and then returns its object-uri in the response body. The response also includes a Location header that provides this URI. An Inventory Change notification is emitted asynchronously to this operation.

Any properties identified as required must be included in the request body. Any properties identified as optional may be excluded from the request body; if an optional property is not found in the request body, its value will be set to its default value.

If the request body contents are valid, the partition is created on the target CPC and its properties are defined to their corresponding request body content's properties' values. If a property is omitted from the request body, its default value is used when creating the partition.

If the API user does not have action/task permission to the New Partition task, a 403 (Forbidden) status code is returned. A 404 (Not Found) status code is returned if the object-id {cpc-id} does not identify a CPC object for which the API user has object-access permission.

If the request body contents fail to validate, a 400 (Bad Request) status code is returned. This may occur because the document fails to define a required property. This may also occur if the document fails to define a single valid partition, for instance defining a property with an invalid value (e.g. an initial-memory value less than zero, or a name that is already in use). If the status of the CPC is not valid (The valid states are "active", "service-required", "degraded", "exceptions"), 409 (Conflict) status code is returned.

Authorization requirements

This operation has the following authorization requirements:
  • Object-access permission to the CPC identified by {cpc-id}.
  • Action/task permission to the New Partition task.

HTTP status and reason codes

On success, HTTP status code 201 (Created) is returned and the response body is provided as described in Response body contents.

The following HTTP status codes are returned for the indicated errors. The response body is a standard error response body providing the reason code indicated and associated error message.

Table 1. Create Partition: HTTP status and reason codes
HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
8 A partition with the name or short-name specified in the request body already exists.
15 The specified access-diagnostic-sampling value is not valid when access-basic-sampling is false.
18 A property that is only valid for type "ssc" was provided, but the type is not "ssc".

The partition type "ssc" only allows "none" for boot-device.

20 The type "ssc" is not supported by the targeted CPC. The property permit-ecc-key-import-functions is not supported by the targeted CPC.
117 boot-device cannot be set to "network-adapter", "storage-adapter", "storage-volume", or "iso-image" at the time of partition creation.
118 There is an error in the fields related to the partition ID. One of:
  • autogenerate-partition-id is false and the partition-id specified in the request body is already in use.
  • autogenerate-partition-id is false and partition-id is not included in the request body.
  • autogenerate-partition-id is true and partition-id is included in the request body.
403 (Forbidden) 1 API user does not have action/task permission to the New Partition task.
404 (Not Found) 1 The CPC with object ID {cpc-id} does not exist, or the API user does not have object-access permission to it.
409 (Conflict) 1 The operation cannot be performed because the CPC designated by the URI does not have a valid status. The valid states are "active", "service-required", "degraded", and "exceptions".
2 The operation cannot be performed because the CPC designated by the request URI is currently busy performing some other operation.
5 The operation cannot be performed because the CPC designated by the request URI is currently not enabled for DPM.
10 The operation cannot be performed because the affected SE is in the process of being shut down.
116 The reserve-resources value is true but resources are not available to be reserved for this partition's use.
329 The operation cannot be performed because the CPC designated by the request URI is an unmanaged CPC, which is not supported by this operation.
503 (Service Unavailable) 1 The request could not be processed because the HMC is not currently communicating with an SE needed to perform the requested operation.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. Create Partition: Request
Create Partition: Request 
POST /api/cpcs/d49a116c-d938-3b87-ad7c-444752db1216/partitions HTTP/1.1 
x-api-session: v6n1aljy1tmlsjq7ki955u0s4t7qr8xabmiu0pbpbadgq7fe 
content-type: application/json 
content-length: 117 
{ 
   "name":"Partition",
   "cp-processors":3, 
   "initial-memory":1024, 
   "maximum-memory":2048,
   "processor-mode":"shared" 
} 
Figure 2. Create Partition: Response
201 Created 
server: zSeries management console API web server / 2.0 
location: /api/partitions/9cfdf912-89cf-11e5-8092-020000000056 
cache-control: no-cache 
date: Fri, 13 Nov 2015 06:26:42 GMT 
content-type: application/json;charset=UTF-8 
content-length: 69 
{ 
   "object-uri":"/api/partitions/9cfdf912-89cf-11e5-8092-020000000056" 
}