# Schedule

> **Package : spaceone.api.cost\_analysis.v1**

## Schedule

{% hint style="info" %}
**Schedule Methods:**
{% endhint %}

| Method                  | Request                                         | Response                                                                                                           |
| ----------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create)   | [CreateScheduleRequest](#createschedulerequest) | [ScheduleInfo](#scheduleinfo)                                                                                      |
| [**update**](#update)   | [UpdateScheduleRequest](#updateschedulerequest) | [ScheduleInfo](#scheduleinfo)                                                                                      |
| [**enable**](#enable)   | [ScheduleRequest](#schedulerequest)             | [ScheduleInfo](#scheduleinfo)                                                                                      |
| [**disable**](#disable) | [ScheduleRequest](#schedulerequest)             | [ScheduleInfo](#scheduleinfo)                                                                                      |
| [**delete**](#delete)   | [ScheduleRequest](#schedulerequest)             | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)         | [GetScheduleRequest](#getschedulerequest)       | [ScheduleInfo](#scheduleinfo)                                                                                      |
| [**list**](#list)       | [ScheduleQuery](#schedulequery)                 | [SchedulesInfo](#schedulesinfo)                                                                                    |
| [**stat**](#stat)       | [ScheduleStatQuery](#schedulestatquery)         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /cost-analysis/v1/schedules

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [CreateScheduleRequest](#createschedulerequest) |
| Response | [ScheduleInfo](#scheduleinfo)                   |

### update

> **PUT** /cost-analysis/v1/schedule/{schedule\_id}

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [UpdateScheduleRequest](#updateschedulerequest) |
| Response | [ScheduleInfo](#scheduleinfo)                   |

### enable

> **PUT** /cost-analysis/v1/schedule/{schedule\_id}/enable

| Type     | Message                             |
| -------- | ----------------------------------- |
| Request  | [ScheduleRequest](#schedulerequest) |
| Response | [ScheduleInfo](#scheduleinfo)       |

### disable

> **PUT** /cost-analysis/v1/schedule/{schedule\_id}/disable

| Type     | Message                             |
| -------- | ----------------------------------- |
| Request  | [ScheduleRequest](#schedulerequest) |
| Response | [ScheduleInfo](#scheduleinfo)       |

### delete

> **DELETE** /cost-analysis/v1/schedule/{schedule\_id}

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [ScheduleRequest](#schedulerequest)                                                                              |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### get

> **GET** /cost-analysis/v1/schedule/{schedule\_id}

| Type     | Message                                   |
| -------- | ----------------------------------------- |
| Request  | [GetScheduleRequest](#getschedulerequest) |
| Response | [ScheduleInfo](#scheduleinfo)             |

### list

> **GET** /cost-analysis/v1/schedules
>
> **POST** /cost-analysis/v1/schedules/search

| Type     | Message                         |
| -------- | ------------------------------- |
| Request  | [ScheduleQuery](#schedulequery) |
| Response | [SchedulesInfo](#schedulesinfo) |

### stat

> **POST** /cost-analysis/v1/schedules/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [ScheduleStatQuery](#schedulestatquery)                                                                            |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

##

## Message

### CreateScheduleRequest

| Field            | Type                                                                                                               | Required | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| name             | string                                                                                                             |     ✘    |             |
| schedule         | [Scheduled](#scheduled)                                                                                            |     ✔    |             |
| options          | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| tags             | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| data\_source\_id | string                                                                                                             |     ✔    |             |
| domain\_id       | string                                                                                                             |     ✔    |             |

### GetScheduleRequest

| Field        | Type           | Required | Description |
| ------------ | -------------- | :------: | ----------- |
| schedule\_id | string         |     ✔    |             |
| domain\_id   | string         |     ✔    |             |
| only         | list of string |     ✘    |             |

### ScheduleInfo

| Field               | Type                                                                                                               | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| schedule\_id        | string                                                                                                             |             |
| name                | string                                                                                                             |             |
| state               | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                                            |             |
| schedule            | [Scheduled](#scheduled)                                                                                            |             |
| options             | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| tags                | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |             |
| data\_source\_id    | string                                                                                                             |             |
| domain\_id          | string                                                                                                             |             |
| created\_at         | string                                                                                                             |             |
| last\_scheduled\_at | string                                                                                                             |             |

### ScheduleQuery

| Field            | Type                                                                                               | Required | Description |
| ---------------- | -------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query            | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) |     ✘    |             |
| schedule\_id     | string                                                                                             |     ✘    |             |
| name             | string                                                                                             |     ✘    |             |
| state            | string                                                                                             |     ✘    |             |
| data\_source\_id | string                                                                                             |     ✘    |             |
| domain\_id       | string                                                                                             |     ✔    |             |

### ScheduleRequest

| Field        | Type   | Required | Description |
| ------------ | ------ | :------: | ----------- |
| schedule\_id | string |     ✔    |             |
| domain\_id   | string |     ✔    |             |

### ScheduleStatQuery

| Field      | Type                                                                                                             | Required | Description |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------- |
| query      | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✔    |             |
| domain\_id | string                                                                                                           |     ✔    |             |

### Scheduled

| Field    | Type                                                                                                    | Description |
| -------- | ------------------------------------------------------------------------------------------------------- | ----------- |
| cron     | string                                                                                                  |             |
| interval | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)         |             |
| minutes  | [list of int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |
| hours    | [list of int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### SchedulesInfo

| Field        | Type                                                                                            | Description |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------- |
| results      | [list of ScheduleInfo](#scheduleinfo)                                                           |             |
| total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) |             |

### UpdateScheduleRequest

| Field        | Type                                                                                                               | Required | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------ | :------: | ----------- |
| schedule\_id | string                                                                                                             |     ✔    |             |
| name         | string                                                                                                             |     ✘    |             |
| schedule     | [Scheduled](#scheduled)                                                                                            |     ✘    |             |
| options      | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| tags         | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    |             |
| domain\_id   | string                                                                                                             |     ✔    |             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spaceone-dev.gitbook.io/spaceone-apis/cost_analysis/v1/schedule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
