{anchor:acffu}
h3. commadmin resource create
The {{commadmin resource create}} command creates a directory entry for a resource.
For instructions on creating a resource, see [Creating a Resource|#acffy].
h2. Syntax
{noformat}
commadmin resource create -D <login> -n <domain> -w <password> -u <identifier> -N <name>
[-c <calendar identifier>] [-A [+]<attributename>:<value>] [-C <DWPHost>]
[-d <domainname> ] [-h] [-?] [-i <inputfile>][-p <AM port>] [-s] [-T <time zone>] [-v]
[-V] [-X <AM host>]
{noformat}
h2. Options
The following options are mandatory:
||Option ||Description ||
|{{-D}} _login_ |The user ID of the user with permission to execute this command. |
|{{-n}} _domain_ |Domain of the user specified with the {{-D}} option. |
|{{-w}} _password_ |Password of the user specified with the {{-D}} option. |
|{{-u}} _identifier_ |Resources’ unique identifier.This _identifier_ value should be unique within the domain namespace or within all the users and resources the calendar manages in the calendar mode. |
|{{-N}} _name_ |Friendly name used to display the resource in the calendar GUI. |
|{{-c}} _calendar identifier_ |Identifier for this resource's calendar.The identifier value should be unique throughout all the calendars managed by the Calendar Server |
The following options are non-mandatory:
||Option ||Description ||
|{{-A}} [+] _attributename_:_value_ |An attribute to modify. The _attributename_ is defined in the LDAP schema and _value_ replaces any and all current values for this attribute in the directory. Repeat this option to modify multiple attributes at the same time, or to specify multiple values for the same attribute.A “+” before the _attributename_ indicates adding the value to the current list of attributes. |
|{{-C}} _DWPHost_ |The DNS name of the back end calendar server which hosts this user's calendars.If the DNS name of the backend calendar server is not specified, the value stored in the ics.conf file of the server is used as the default value. |
|{{-d}} _domain name_ |Domain of the resource. If {{-d}} is not specified, the domain specified by {{-n}} is used. |
|{{-h}}, {{–?}} |Prints command usage syntax. |
|{{-i}} _inputfile_ |Reads the command information from a file instead of the command line.An option value specified in the input file overrides any value for the same option set in the command line. |
|{{-p}} _AM port_ |Specifies an alternate TCP port where the Access Manager is listening. If not specified, the default _AM port_ is used, or Port 80 is used if no default was configured at install time. |
|{{-s}} |Use SSL (Secure Socket Layer) to connect to the Access Manager. |
|{{-T}} _time zone_ |The time zone used to display the resource's calendar in the calendar’s user interface. See [Calendar Time Zone Strings|Attribute Values and Calendar Time Zones#ACFIB] for a list of the valid time zone strings. |
|{{-v}} |Enable debugging output. |
|{{-V}} |Prints information about the utility and its version. |
|{{-X}} _AM host_ |Specifies the host on which the Access Manager is running. If not specified, the default _AM host_ is used, or the localhost if no default was configured at install time. |
{anchor:acffx}
h2. Example
To create a resource with Name {{peter}} in the calendar {{cal.siroe.com}} under the domain {{varrius.com}}:
{code}
commadmin resource create -D chris -n sesta.com -w bolton \
-d varrius.com -u id -c calid -N peter -C cal.siroe.com
{code}{anchor:acffy}
h2. Creating a Resource{anchor:indexterm-251} {anchor:indexterm-252}
A resource consists of two data descriptions: a directory entry and a calendar in the Calendar Server database. The directory entry has an attribute, {{icsCalendar}}, whose value is the name of the calendar associated with the resource.
You can create a resource with the two data descriptions, using either of the following methods:
* Use {{commadmin resource create}} to create a directory entry.
\\
The calendar for the resource is created automatically when the resource is first invited to an event. The {{ics.conf}} parameter, {{resource.invite.autoprovision}}, determines whether a resource's calendar is created automatically when the resource is invited to an event. By default, the value of this parameter is set to Yes.
\\
To create the resource's calendar before any invitations are sent to the resource, use{anchor:indexterm-253} the {{cscal}} utility.
\\
*Example*
\\
Use {{commadmin resource create}} to create a directory entry:
{code}
commadmin resource create -D amadmin -w ampassword -n blink.sesta.com \
-X blink -p 5555 -d varrius.com -u resourceOne \
-N firstResource -c resourceOneCalendar
{code}
\\
The directory entry is as follows:
{code}
dn: uid=resourceONE,ou=People,o=varrius,o=domainroot
uid: resrouceONE
objectClass: icsCalendarResource
objectClass: top
cn: firstResource
icsStatus: active
icsCalendar: resourceOne
{code}
* Use the {anchor:indexterm-254} {{csresource}} utility by itself. The {{csresource}} utility creates a directory entry and a calendar.
\\
However, using {{csresource}} to create both the directory entry and the calendar is only recommended if the directory is in a Schema 1 environment and you are not using Access Manager.
You can now log in as any user and invite the resource to an event.
For a detailed description of the {{csresource}} and {{cscal}} utilities, see [Calendar Server Command-Line Utilities|http://docs.sun.com/app/docs/doc/819-4654/acanm?a=view] in the _Sun Java System Calendar Server 6.3 Administration Guide_.
h3. commadmin resource create
The {{commadmin resource create}} command creates a directory entry for a resource.
For instructions on creating a resource, see [Creating a Resource|#acffy].
h2. Syntax
{noformat}
commadmin resource create -D <login> -n <domain> -w <password> -u <identifier> -N <name>
[-c <calendar identifier>] [-A [+]<attributename>:<value>] [-C <DWPHost>]
[-d <domainname> ] [-h] [-?] [-i <inputfile>][-p <AM port>] [-s] [-T <time zone>] [-v]
[-V] [-X <AM host>]
{noformat}
h2. Options
The following options are mandatory:
||Option ||Description ||
|{{-D}} _login_ |The user ID of the user with permission to execute this command. |
|{{-n}} _domain_ |Domain of the user specified with the {{-D}} option. |
|{{-w}} _password_ |Password of the user specified with the {{-D}} option. |
|{{-u}} _identifier_ |Resources’ unique identifier.This _identifier_ value should be unique within the domain namespace or within all the users and resources the calendar manages in the calendar mode. |
|{{-N}} _name_ |Friendly name used to display the resource in the calendar GUI. |
|{{-c}} _calendar identifier_ |Identifier for this resource's calendar.The identifier value should be unique throughout all the calendars managed by the Calendar Server |
The following options are non-mandatory:
||Option ||Description ||
|{{-A}} [+] _attributename_:_value_ |An attribute to modify. The _attributename_ is defined in the LDAP schema and _value_ replaces any and all current values for this attribute in the directory. Repeat this option to modify multiple attributes at the same time, or to specify multiple values for the same attribute.A “+” before the _attributename_ indicates adding the value to the current list of attributes. |
|{{-C}} _DWPHost_ |The DNS name of the back end calendar server which hosts this user's calendars.If the DNS name of the backend calendar server is not specified, the value stored in the ics.conf file of the server is used as the default value. |
|{{-d}} _domain name_ |Domain of the resource. If {{-d}} is not specified, the domain specified by {{-n}} is used. |
|{{-h}}, {{–?}} |Prints command usage syntax. |
|{{-i}} _inputfile_ |Reads the command information from a file instead of the command line.An option value specified in the input file overrides any value for the same option set in the command line. |
|{{-p}} _AM port_ |Specifies an alternate TCP port where the Access Manager is listening. If not specified, the default _AM port_ is used, or Port 80 is used if no default was configured at install time. |
|{{-s}} |Use SSL (Secure Socket Layer) to connect to the Access Manager. |
|{{-T}} _time zone_ |The time zone used to display the resource's calendar in the calendar’s user interface. See [Calendar Time Zone Strings|Attribute Values and Calendar Time Zones#ACFIB] for a list of the valid time zone strings. |
|{{-v}} |Enable debugging output. |
|{{-V}} |Prints information about the utility and its version. |
|{{-X}} _AM host_ |Specifies the host on which the Access Manager is running. If not specified, the default _AM host_ is used, or the localhost if no default was configured at install time. |
{anchor:acffx}
h2. Example
To create a resource with Name {{peter}} in the calendar {{cal.siroe.com}} under the domain {{varrius.com}}:
{code}
commadmin resource create -D chris -n sesta.com -w bolton \
-d varrius.com -u id -c calid -N peter -C cal.siroe.com
{code}{anchor:acffy}
h2. Creating a Resource{anchor:indexterm-251} {anchor:indexterm-252}
A resource consists of two data descriptions: a directory entry and a calendar in the Calendar Server database. The directory entry has an attribute, {{icsCalendar}}, whose value is the name of the calendar associated with the resource.
You can create a resource with the two data descriptions, using either of the following methods:
* Use {{commadmin resource create}} to create a directory entry.
\\
The calendar for the resource is created automatically when the resource is first invited to an event. The {{ics.conf}} parameter, {{resource.invite.autoprovision}}, determines whether a resource's calendar is created automatically when the resource is invited to an event. By default, the value of this parameter is set to Yes.
\\
To create the resource's calendar before any invitations are sent to the resource, use{anchor:indexterm-253} the {{cscal}} utility.
\\
*Example*
\\
Use {{commadmin resource create}} to create a directory entry:
{code}
commadmin resource create -D amadmin -w ampassword -n blink.sesta.com \
-X blink -p 5555 -d varrius.com -u resourceOne \
-N firstResource -c resourceOneCalendar
{code}
\\
The directory entry is as follows:
{code}
dn: uid=resourceONE,ou=People,o=varrius,o=domainroot
uid: resrouceONE
objectClass: icsCalendarResource
objectClass: top
cn: firstResource
icsStatus: active
icsCalendar: resourceOne
{code}
* Use the {anchor:indexterm-254} {{csresource}} utility by itself. The {{csresource}} utility creates a directory entry and a calendar.
\\
However, using {{csresource}} to create both the directory entry and the calendar is only recommended if the directory is in a Schema 1 environment and you are not using Access Manager.
You can now log in as any user and invite the resource to an event.
For a detailed description of the {{csresource}} and {{cscal}} utilities, see [Calendar Server Command-Line Utilities|http://docs.sun.com/app/docs/doc/819-4654/acanm?a=view] in the _Sun Java System Calendar Server 6.3 Administration Guide_.