public class ResourceEventsWebService
extends Base
The schema that defines the ResourceEvents resource is defined below.
<xs:simpleType name="NameType">
<xs:restriction base="xs:string">
<xs:enumeration value="Throttle" />
<xs:enumeration value="HealthCheck" />
<xs:enumeration value="SpaceReclamation" />
<xs:enumeration value="ShareReplication" />
<xs:enumeration value="PartitionReplication" />
<xs:enumeration value="ScriptExecution" />
<xs:enumeration value="EmailReports" />
<xs:enumeration value="CloudShareShare" />
<xs:enumeration value="CloudShareLsu" />
<xs:enumeration value="SecureSnapshot" />
<xs:enumeration value="CopyPath" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="EmailType">
<xs:restriction base="xs:string">
<xs:enumeration value="Status" />
<xs:enumeration value="Config" />
</xs:restriction>
</xs:simpleType>
<xs:element name="ResourceEvents">
<xs:complexType>
<xs:sequence>
<xs:element name="Success" type="xs:boolean" minOccurs="1" maxOccurs="1" />
<xs:element name="Total" type="xs:int" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>Total number of resource events.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="ResourceEvent" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ResourceEvent">
<xs:annotation>
<xs:documentation>A single resource event.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:string">
<xs:annotation>
<xs:documentation>Unique identifier for the resource event, chosen by the system at creation time.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ResourceId" type="xs:string" minOccurs="1" maxOccurs="1" >
<xs:annotation>
<xs:documentation>Unique identifier of the resource associated with the event (read-only).
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Type" type="common:NameType"/>
<xs:element name="Title" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Object name or a display name for the resource event.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Start" type="xs:long">
<xs:annotation>
<xs:documentation>Milliseconds since epoch.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="End" type="xs:long" minOccurs="0">
<xs:annotation>
<xs:documentation>Milliseconds since epoch. Applies to Throttle resource only.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Recurrence" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>If not specified or set to "none",
defines a single event or turns an existing series into a single event.
Otherwise allows to define recurrence in iCal format:
FREQ=DAILY/WEEKLY/MONTHLY/YEARLY; Repeat every day, week, month or year.
INTERVAL=1; Repeat each many units of FREQ. Default is 1.
BYDAY=SU,MO,TU,WE,TH,FR,SA; Used with FREQ=WEEKLY to define week days.
BYMONTH=5; Repeat every ith month.
BYMONTHDAY=5; Repeat every ith day of month.
COUNT=3; Repeat the defined number of times.
UNTIL=1527800399000; Time in miliseconds, denoting the end of recurrence range.
If neither COUNT nor UNTIL is specified, recurrence will continue forever.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HasModifiedInstance" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates modified instance in a series (read-only).
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Bandwidth" type="xs:long" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Bandwidth for Throttle resource event.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ShareName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Share name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PartitionName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Partition name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EmailType" type="common:EmailType" minOccurs="0"/>
<xs:element name="ScriptName" type="xs:string" minOccurs="0" />
<xs:element name="ScriptParameters" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>param1 param2 param3 ...</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Targets" type="xs:string" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Replication targets. Always use array notation in JSON format.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CloudShareObjectType" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Cloud Share object type (share or lsu).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CloudShareOjectName" type="xs:string">
<xs:annotation>
<xs:documentation>Name of object type to archive to the cloud.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CloudShareStorageServer" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Name of storage server containing the lsu, only for object type lsu.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ObjectType" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Secure snapshot object type (share, partition or lsu)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="SourceName" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Name of the source share.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DestinationName" type="xs:string" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Name of the destination share.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ResourceEventColumnNameType">
<xs:restriction base="xs:string">
<xs:enumeration value="Type" />
<xs:enumeration value="Start" />
<xs:enumeration value="End" />
<xs:enumeration value="ShareName" />
<xs:enumeration value="PartitionName" />
<xs:enumeration value="Target" />
<xs:enumeration value="CloudShareObjectType" />
<xs:enumeration value="CloudShareObjectName" />
<xs:enumeration value="CloudShareStorageServer" />
<xs:enumeration value="ObjectType" />
<xs:enumeration value="SourceName" />
<xs:enumeration value="DestinationName" />
</xs:restriction>
</xs:simpleType>
Constructor and Description |
---|
ResourceEventsWebService() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addEvent_1_1(javax.servlet.http.HttpServletRequest request,
ResourceEvent resourceEvent)
POST /rest/ResourceEvents
|
ResourceEvent |
addEvent(javax.servlet.http.HttpServletRequest request,
ResourceEvent resourceEvent)
Deprecated.
As of 1.1, replaced by
addEvent_1_1(HttpServletRequest, ResourceEvent)
|
void |
deleteEvent(javax.servlet.http.HttpServletRequest request,
java.lang.String id)
DELETE /rest/ResourceEvents/{id}
|
ResourceEvent |
getEvent(javax.servlet.http.HttpServletRequest request,
java.lang.String id)
GET /rest/ResourceEvents/{id}
|
ResourceEvents |
getEvents(javax.servlet.http.HttpServletRequest request,
int start,
int limit,
java.lang.String filterString)
GET /rest/ResourceEvents
|
ResourceEvent |
updateEvent(javax.servlet.http.HttpServletRequest request,
java.lang.String id,
ResourceEvent resourceEvent)
PUT /rest/ResourceEvents/{id}
|
public ResourceEvents getEvents(@Context javax.servlet.http.HttpServletRequest request, int start, int limit, java.lang.String filterString)
Get the list of scheduled events on the system.
<xs:element name="getEvents">
supports the table query parameters for paging, and filtering by column name.
Column names are defined in <xs:simpleType name="ResourceEventColumnNameType">
Start is a time in milliseconds since the Unix epoch of 1970. It represents the beginning of the time range you wish to get events for. End is a time in milliseconds since the Unix epoch of 1970. It represents the end of the time range you wish to get events for.
If only Start is specified, all events from Start plus 30 days are returned. If only End is specified, all events from midnight this morning until End are returned. If Start and End are both specified all events from Start to End are returned. If neither Start or End are specified, all events from midnight this morning plus 30 days are returned. The maximum number of events ever returned will be limited to 7 * 1024 in order to not run the system out of memory.
Type specifies the type of event you are interested in. If you want all the events reguardless of type, simply leave it out of the filter.
Response Entity type: <xs:element name="ResourceEvents">
EventTypes
public ResourceEvent getEvent(@Context javax.servlet.http.HttpServletRequest request, java.lang.String id)
Get an event, identified by {id}
(corresponds to <xs:element name="Id" type="xs:string">
field).
If an event is a recurring event, as identifed by the value of its <xs:element name="Recurrence" type="xs:string">
,
you can get either the recurring series, or a single instance of the event.
A single instance of a recurring event is identified by appending an at-sign (@) followed by a timetamp to the id. For example,
GET /rest/ResourceEvents/12
gets the entire series of a recurring event, identified by id 12.GET /rest/ResourceEvents/12@1323072000000
gets the instance at time 1323072000000 of the recurring series.
Response Entity type: <xs:element name="ResourceEvent">
public void deleteEvent(@Context javax.servlet.http.HttpServletRequest request, java.lang.String id)
Delete an event, identified by {id}
(corresponds to <xs:element name="Id" type="xs:string">
field).
If an event is a recurring event, as identifed by the value of its <xs:element name="Recurrence" type="xs:string">
,
you can delete either the recurring series, or a single instance of the event.
A single instance of a recurring event is identified by appending an at-sign (@) followed by a timetamp to the id. For example,
DELETE /rest/ResourceEvents/12
deletes the entire series of a recurring event, identified by id 12.DELETE /rest/ResourceEvents/12@1323072000000
deletes the instance at time 1323072000000 of the recurring series.public ResourceEvent updateEvent(@Context javax.servlet.http.HttpServletRequest request, java.lang.String id, ResourceEvent resourceEvent)
Update an event, identified by {id}
(corresponds to <xs:element name="Id" type="xs:string">
field).
If an event is a recurring event, as identifed by the value of its <xs:element name="Recurrence" type="xs:string">
,
you can modify either the recurring series, or a single instance of the event.
A single instance of a recurring event is identified by appending an at-sign (@) followed by a timetamp to the id. For example,
PUT /rest/ResourceEvents/12
modifies the entire series of a recurring event, identified by id 12.PUT /rest/ResourceEvents/12@1323072000000
modifies the instance at time 1323072000000 of the recurring series.NOTE:
Request Entity type: <xs:element name="ResourceEvent">
Response Entity type: <xs:element name="ResourceEvent">
public javax.ws.rs.core.Response addEvent_1_1(@Context javax.servlet.http.HttpServletRequest request, ResourceEvent resourceEvent)
Add a new event to the system.
NOTE:
Request Entity type: <xs:element name="ResourceEvent">
Response Entity type: <xs:element name="ResourceEvent">
public ResourceEvent addEvent(@Context javax.servlet.http.HttpServletRequest request, ResourceEvent resourceEvent)
addEvent_1_1(HttpServletRequest, ResourceEvent)
Add a new event to the system.
NOTE:
Request Entity type: <xs:element name="ResourceEvent">
Response Entity type: <xs:element name="ResourceEvent">
Copyright © 2011-2024 Quantum Corporation. All Rights Reserved.