3.1.4.3.2.1.1.3 Create
The Create command is used to create an object on a server.
-
<xsd:complexType name="Create"> <xsd:all> <xsd:element name="ParentObject" type="ObjectReference" minOccurs="0" /> <xsd:element name="ObjectDefinition" type="MajorObject" /> </xsd:all> <xsd:attribute name="Scope" > <xsd:simpleType> <xsd:restriction base="xsd:string" > <xsd:enumeration value="Session" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="AllowOverwrite" type="xsd:boolean" /> </xsd:complexType>
The following table describes the elements allowed in the Create command.
Element |
Default value |
Description |
---|---|---|
ParentObject |
Server object |
The parent object under which the new object is created. The ObjectReference type is defined in section 3.1.4.3.2.1.1.1. |
ObjectDefinition |
[Required] |
The full XML that defines an object that is derived from MajorObject, as described in section 2.2.4.2. However, the Permission object cannot be created with a Create command even though it is derived from MajorObject. A Permission object MUST NOT be specified in the ObjectDefinition element. Only one of the objects that is an extension of Permission can be created with a Create command. |
The following table describes the XML attributes that are allowed in the Create command.
Attribute |
Default value |
Description |
---|---|---|
Scope |
Empty |
If Scope is specified as "Session", the object is created with session scope. If this XML attribute is present, any value other than "Session", including an empty value, will return an error. |
AllowOverwrite |
False |
A Boolean that determines how to handle an object that already exists. If true, the object is overwritten; if false, the server raises an error. |
The return result type for the Create command is xmla-e:emptyresult.