> This is part 1 of 3 of the full documentation (pages 1–100 of 224).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.skeddly.com/llms-full.txt/1
> Page index: https://docs.skeddly.com/llms.txt

# Introduction

Welcome to the Skeddly API.

This API is organized as a [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer)ful API:

* URLs are organized into "resources", and
* Appropriate HTTP methods, such as GET, POST, PUT, and DELETE are used.

[Cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing), or CORS, is fully supported.

POST and PUT requests support [JSON](http://www.json.org/) in the body of the request.

Almost all responses, successes and failures, return [JSON](http://www.json.org/).


# Making Requests

All API requests must be made to the following endpoint:

`https://api.skeddly.com/api/`

All requests must use HTTPS.

Except for a few exceptions, all responses will return JSON data.

By default, some properties of some response models may be omitted from responses. This is for performance reasons. To include those properties, specify them in the request's `include` query parameter.


# Authentication

In order to use the Skeddly API, you require an API key. API keys can be obtained by doing the following:

1. Sign-in to your Skeddly account.
2. On the left navigation panel, click "Developers" then "API Keys".
3. Click the "Create API Key" button to create an API key.

When making HTTPS requests, all requests must include the `Authorization:` header in the following format:

`Authorization: AccessKey <api key>`

You must replace  with your personal API key.

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/resource HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}
With shell, you can just pass the correct header with each request

```bash
curl "api_endpoint_here"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}
Include your access key in the client constructor.

```python
import skeddly
client = skeddly.Client(
    accessKey="<api key>"
)
```

{% endtab %}
{% endtabs %}

Make sure to replace `<api key>` with your API key.


# Clients

## Official

The following clients are officially supported by the Skeddly team.

* .NET - <https://github.com/eleven41/skeddly-sdk-net>
* JavaScript - <https://github.com/eleven41/skeddly-sdk-js>
* Python - <https://github.com/eleven41/skeddly-sdk-python>


# Errors

## Objects

* [Error](/data-types/error-object)

## Extras

* [HTTP Status Codes](/overview/errors/http-status-codes)
* [Error Codes](/overview/errors/error-codes)


# HTTP Status Codes

The Skeddly API uses the following HTTP status codes:

| Status Code | Meaning                                                                  |
| ----------- | ------------------------------------------------------------------------ |
| 200         | Successful operation                                                     |
| 400         | Bad Request -- Change your parameters and try again.                     |
| 401         | Unauthorized -- Your API key is invalid or missing.                      |
| 404         | Not Found -- The specified resource could not be found                   |
| 500         | Internal Server Error -- A problem occurred on our end. Try again later. |
| 503         | Service Unavailable                                                      |


# Error Codes

The Skeddly API will use the following error codes within the JSON to indicate errors in the API operation.

| **Error Code**               | **Meaning**                                                    |
| ---------------------------- | -------------------------------------------------------------- |
| ActionExecutionNotFound      | The specified action execution cannot be not found.            |
| ActionCannotBeDeleted        | The specified action cannot be deleted.                        |
| ActionNotFound               | The specified action cannot be found.                          |
| CredentialInUse              | The specified credential is in use.                            |
| CredentialNotFound           | The specified credential cannot found found.                   |
| ErrorChangingPassword        | An error occurred changing the user password.                  |
| InvalidActionExecutionId     | The specified action execution ID is invalid.                  |
| InvalidActionId              | The specified action ID is invalid.                            |
| InvalidActionVersionId       | The specified action version ID is invalid.                    |
| InvalidCredentialId          | The specified credential ID is invalid.                        |
| InvalidManagedInstanceId     | The specified Managed Instance ID is invalid.                  |
| InvalidParameter             | One of the parameters in the request is invalid.               |
| InvalidRequest               | The request is invalid.                                        |
| InvalidRoleOrAccessDenied    | The specified IAM role is invalid, or it could not be assumed. |
| InvoiceNotFound              | The specified invoice cannot be found.                         |
| ManagedInstanceGroupNotFound | The specified Managed Instance Group cannot be found.          |
| ManagedPolicyNotFound        | The specified managed policy cannot be found.                  |
| ParameterValidationFailed    | One or more parameters failed validation.                      |
| TimeZoneNotFound             | The specified time zone cannot be found.                       |
| UnauthorizedOperation        | The caller is not authorized to execute the command.           |
| UserNotFound                 | The specified user cannot be found.                            |


# Handling Errors

Where ever possible, our SDKs raise/throw exceptions when errors occur. The exception classes include the error message and `errorCode` property returned in the error object.

{% tabs %}
{% tab title="Python" %}

```python
import skeddly

try:
    # Use the Skeddly SDK
    pass
except skeddly.ParameterValidationFailedException as e:
    print("Error Message: " + str(e))
    print("ErrorCode:" + e.errorCode)
    print("modelState: " + str(e.modelState))
except skeddly.SkeddlyWebException as e:
    print("Error Message: " + str(e))
    print("ErrorCode:" + e.errorCode)
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}


# Action Exclusions

## Methods

* [CreateActionExclusion](/resources/action-exclusions/createactionexclusion-method)
* [DeleteActionExclusion](/resources/action-exclusions/deleteactionexclusion-method)
* [GetActionExclusion](/resources/action-exclusions/getactionexclusion-method)
* [ListActionExclusions](/resources/action-exclusions/listactionexclusions-method)
* [ModifyActionExclusion](/resources/action-exclusions/modifyactionexclusion-method)

## Objects

* [ActionExclusion](/data-types/actionexclusion-object)


# CreateActionExclusion Method

## Description

Creates an action exclusion.

## HTTP Request

`POST https://api.skeddly.com/api/ActionExclusions/`

## Body

The body is a JSON structure with the following properties.

### expiryDate

Date and time, in ISO 8601 format, at which the exclusion should expire.

Type: `string`

Required: No

Default Value: No expiry date

### isEnabled

`true` if the exclusion is to be enabled, otherwise `false`.

Type: `boolean`

Required: Yes

### name

Name of the new action exclusion.

Type: `string`

Required: Yes

### processes

List of processes that should be excluded.

Type: Array of `string`

Valid Values:

* `start-resource`
* `stop-resource`

### projectId

ID of the project in which the exclusion is to be created.

Type: `string`

Required: Recommended for future compatability

Default Value: The account's default project.

### resourceIdentificationMethod

Method in which resources will be selected.

Type: `string`

Valid Values:

* `all`
* `by-resource-id`
* `by-resource-tag`

Required: Yes

### resourceIds

IDs of the resources that are to be included in the exclusion. Required when `resourceIdentificationMethod` is `by-resource-id`.

Type: Array of `string`

Required: Conditional

### resourceTagComparison

Comparison to use when identifying resources by resource tag. Required when `resourceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

### resourceType

Type of resource that the exclusion applies to.

Type: `string`

Required: Yes

### startDate

Date and time, in ISO 8601 format, at which the exclusion should start.

Type: `string`

Required: No

Default Value: Applies immediately

### timeZoneId

ID of the time zone for the exclusion times and dates.

Type: `string`

Required: Yes

## Returns

An [ActionExclusion](/data-types/actionexclusion-object) object.

## &#x20;Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/ActionExclusions HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "projectId": "proj-00000001",
    
    "name": "My Exclusion",
    "isEnabled": true,
    
    "expiryDate": "2020-05-19T00:00:00Z",
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ],
    
    "processes": [
        "start-resource",
        "stop-resource"
    ]
}
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExclusionId": "excl-00000001",
    "projectId": "proj-00000001",

    "name": "My Exclusion",
    "status": "active",
    "isEnabled": true,

    "createdDate": "2020-05-12T11:36:00Z",
    "lastModifiedDate": "2020-05-12T11:36:00Z",
    "lastModifiedBy": "u-00000001",
    
    "startDate": "2020-05-15T00:00:00Z",
    "expiryDate": "2020-05-19T00:00:00Z",
    "timeZoneId": "Eastern Standard Time",
    
    "processes": [
        "start-resource",
        "stop-resource"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ]
}
```


# DeleteActionExclusion Method

## Description

Deletes an action exclusion.

## HTTP Request

`DELETE https://api.skeddly.com/api/ActionExclusions/<id>`

## URL Parameters

### id

ID of the action exclusion.

Type: `string`

Required: Yes

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/ActionExclusions/excl-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/ActionExclusions/excl-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}


# GetActionExclusion Method

## Description

Retrieves information for an action exclusion.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExclusions/<id>`

## URL Parameters

### id

ID of the exclusion to retrieve.

Type: `string`

Required: Yes

## Returns

An [ActionExclusion](/data-types/actionexclusion-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExclusions/excl-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExclusions/excl-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExclusionId": "excl-00000001",
    "projectId": "proj-00000001",

    "name": "My Exclusion",
    "status": "active",
    "isEnabled": true,

    "createdDate": "2020-05-12T11:36:00Z",
    "lastModifiedDate": "2020-05-12T11:36:00Z",
    "lastModifiedBy": "u-00000001",
    
    "startDate": "2020-05-15T00:00:00Z",
    "expiryDate": "2020-05-19T00:00:00Z",
    "timeZoneId": "Eastern Standard Time",
    
    "processes": [
        "start-resource",
        "stop-resource"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ]
}
```


# ListActionExclusions Method

## Description

Retrieves the list of action exclusions.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExclusions`

## Query Parameters

The following query parameters are accepted.

### filter.projectIds

A comma-separated list of project IDs to include.

Type: `string`

Required: Recommended for future compatability

### filter.resourceType

The resource type to limit the results.

Type: `string`

Value Values:

* `amazon-ec2-instance`
* `amazon-rds-instance`

Required: No

### filter.status

A comma-separated list of statuses.

Type: `string`

Value Values:

* `active-disabled`
* `deleted`
* `expired`

Required: No

## Returns

Array of [ActionExclusion](/data-types/actionexclusion-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExclusions HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExclusions"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
    {
        "actionExclusionId": "excl-00000001",
        "projectId": "proj-00000001",
    
        "name": "My Exclusion",
        "status": "active",
        "isEnabled": true,
    
        "createdDate": "2020-05-12T11:36:00Z",
        "lastModifiedDate": "2020-05-12T11:36:00Z",
        "lastModifiedBy": "u-00000001",
        
        "startDate": "2020-05-15T00:00:00Z",
        "expiryDate": "2020-05-19T00:00:00Z",
        "timeZoneId": "Eastern Standard Time",
        
        "processes": [
            "start-resource",
            "stop-resource"
        ],
        
        "resourceType": "amazon-ec2-instance",
        
        "resourceIdentificationMethod": "by-resource-id",
        "resourceIds": [
            "i-12345678"
        ]
    }
]
```


# ModifyActionExclusion Method

## Description

Updates an existing action exclusion.

## HTTP Request

`PUT https://api.skeddly.com/api/ActionExclusions/<id>`

## URL Parameters

### Id

ID of the action exclusion.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.&#x20;

###

## Returns

An [ActionExclusion](/data-types/actionexclusion-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/ActionExclusions/excl-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "My Exclusion",
    "isEnabled": true,
    
    "expiryDate": "2020-05-19T00:00:00Z",
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ],
    
    "processes": [
        "start-resource",
        "stop-resource"
    ]
}
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExclusionId": "excl-00000001",
    "projectId": "proj-00000001",

    "name": "My Exclusion",
    "status": "active",
    "isEnabled": true,

    "createdDate": "2020-05-12T11:36:00Z",
    "lastModifiedDate": "2020-05-12T11:36:00Z",
    "lastModifiedBy": "u-00000001",
    
    "startDate": "2020-05-15T00:00:00Z",
    "expiryDate": "2020-05-19T00:00:00Z",
    "timeZoneId": "Eastern Standard Time",
    
    "processes": [
        "start-resource",
        "stop-resource"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ]
}
```


# Action Executions

## Methods

* [CancelActionExecution](/resources/action-executions/cancelactionexecution-method)
* [GetActionExecution](/resources/action-executions/getactionexecution-method)
* [GetActionExecutionLog](/resources/action-executions/getactionexecutionlog-method)
* [ListActionExecutions](/resources/action-executions/listactionexecutions-method)
* [ListUpcomingActionExecutions](/resources/action-executions/listupcomingactionexecutions-method)

## Objects

* [ActionExecution](/data-types/actionexecution-object)
* [ActionExecutionResult](/data-types/actionexecutionresult-object)
* [UpcomingActionExecution](/data-types/upcomingactionexecution-object)


# CancelActionExecution Method

## Description

Cancels a running action execution. The action will stop and execute any cancelling logic.

## HTTP Request

`PUT https://api.skeddly.com/api/ActionExecutions/<id>/Cancel`

## URL Parameters

### id

The ID of the action execution to cancel.

Type: `string`

Required: Yes

## Returns

An [ActionExecution](/data-types/actionexecution-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/ActionExecutions/ae-00000001/Cancel HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/ActionExecutions/ae-00000001/Cancel"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExecutionId": "ae-00000001",
    "status": "cancelling",
    "startDate": "2016-06-01T12:00:00Z",
    "trigger": "schedule",
    "actionId": "a-00000001",
    "actionVersionId": "av-00000001",
    "actionType": "amazon-start-ec2-instance",
    "actionName": "Start My Instances",
    "timeZoneId": "UTC",
    "credentialId": "cred-00000001"
}
```


# GetActionExecution Method

## Description

Retrieves information about a single action execution.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExecutions/<id>`

## URL Parameters

### id

The ID of the action execution.

Type: `string`

Required: Yes

## Returns

An [ActionExecution](/data-types/actionexecution-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExecutions/ae-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExecutions/ae-00000001"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExecutionId": "ae-00000001",
    "status": "complete",
    "startDate": "2016-06-01T12:00:00Z",
    "endDate": "2016-06-01T12:03:00Z",
    "result": {
        "code": 0,
        "text": "Execution succeeded"
    },
    "trigger": "schedule",
    "actionId": "a-00000001",
    "actionVersionId": "av-00000001",
    "actionType": "amazon-start-ec2-instance",
    "actionName": "Start My Instances",
    "timeZoneId": "UTC",
    "credentialId": "cred-00000001"
}
```


# GetActionExecutionLog Method

## Description

Returns some or all of the activity log from one action execution.

On success, the response of this method will return the activity log in the response body as plain text. It will not be a JSON body. Headers will be included to help retrieve subsequent portions of the activity log.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExecutions/<id>/Log`

## URL Parameters

### id

The ID of the action execution.

Type: `string`

Required: Yes

## Query Parameters

### marker

Omiting this value will retrieve the beginning of the log. Specifying this parameter will retrieve the next portion of the activity log. Markers specified should be those returned from a previous call.

Type: `string`

Required: No

## Response Headers

Some headers will be included to indicate continuation of the log in a later call.

### X-Skeddly-More

Indicates whether the log is complete or if there is more to retrieve.

Possible values:

* `none` - The log is complete.
* `more` - There is more log to retrieve. The next portion can be retrieved immediately.
* `more-later` - There is no more log to retrieve now, but the action is still executing, so there will be more later. The next portion can be retrieved later. Delay 1 or 2 minutes then try retrieving the next portion.

### X-Skeddly-Next-Marker

Indicates the marker value to include in a subsequent call to retrieve the next portion of the log.

Type: `string`

## Response Body

The response body will contain the activity log in plain text.

## Examples

### Sample 1: Getting the first portion of a log

#### Sample Request

This requests omits the `marker` parameter from the request. This indicates to retrieve the first portion of the log.

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExecutions/ae-00000001/Log HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExecutions/ae-00000001/Log"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

#### Sample Response

This response specifies `more` to show that more log can be downloaded immediately. The next marker is also included to be used to retrieve the next portion.

```http
Content-Type: plain/text
X-Skeddly-More: more
X-Skeddly-Next-Marker: marker1

D:2020-07-13 12:00 Log Starts
D:2020-07-13 12:00 Line 1
D:2020-07-13 12:00 Line 2
```

### Sample 2: Getting the next portion of a log

#### Sample Request

This requests includes the `marker` parameter from the previous request. This indicates to retrieve the next portion of the log.

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExecutions/ae-00000001/Log?marker=marker1 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExecutions/ae-00000001/Log?marker=marker1"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

#### Sample Response

This response specifies `more` to show that there is still more log portions to retrieve. The next marker is included.

```http
Content-Type: plain/text
X-Skeddly-More: more
X-Skeddly-Next-Marker: marker2

D:2020-07-13 12:00 Log Continues
D:2020-07-13 12:00 Line 3
D:2020-07-13 12:00 Line 4
```


# ListActionExecutions Method

## Description

Retrieves the list of action executions.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExecutions`

## Query Parameters

### include

A comma-separated list of extra extra data to include.

Type: `string`

Required: No

### filter.status

Execution status to limit results.

Type: `string`

Valid Values:

* `all`
* `errorsOnly`
* `completedOnly`
* `runningOnly`

Required: No

### filter.actionIds

A comma-separated list of action IDs.

Type: `string`

Required: No

### filter.credentialIds

A comma-separated list of credential IDs.

Type: `string`

Required: No

### filter.actionClasses

A comma-separated list of types of actions for which to include executions.

Valid Values:

* `standard`
* `managedInstances`

### filter.dateComparesTo

Indicator to which the date range references.

Type: `string`

Valid Values:

* `startDate`
* `endDate`

Default: `startDate`

Required: No

### filter.projectIds

A comma-separated list of project IDs to include.

Type: `string`

Required: Recommended for future compatability

### filter.range.inclusiveStart

Start date (inclusive) of the date range, in ISO8601 format.

Type: `string`

Default: Now - 30 days

Required: No

### filter.range.exclusiveEnd

End date (exclusive) of the date range, in ISO8601 format.

Type: `string`

Default: Now

Required: No

## Returns

Array of [ActionExecution](/data-types/actionexecution-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExecutions HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExecutions"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "actionExecutionId": "ae-00000001",
    "status": "complete",
    "startDate": "2016-06-01T12:00:00Z",
    "endDate": "2016-06-01T12:03:00Z",
    "result": {
        "code": 0,
        "text": "Execution succeeded"
    },
    "trigger": "schedule",
    "actionId": "a-00000001",
    "actionVersionId": "av-00000001",
    "actionType": "amazon-start-ec2-instance",
    "actionName": "Start My Instances",
    "timeZoneId": "UTC",
    "credentialId": "cred-00000001"
  }
]
```


# ListUpcomingActionExecutions Method

## Description

Retrieves the list of upcoming action executions.

## HTTP Request

`GET https://api.skeddly.com/api/ActionExecutions/Upcoming`

## Query Parameters

### filter.actionClasses

A comma-separated list of types of actions.

Type: `string`

Valid Values:

* `standard`
* `managedInstances`

Type: `string`

Required: No

### filter.projectIds

A comma-separated list of project IDs to include.

Type: `string`

Required: Recommended for future compatability

## Returns

Array of [UpcomingActionExecution](/data-types/upcomingactionexecution-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ActionExecutions/Upcoming HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ActionExecutions/Upcoming"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "actionId": "a-00000001",
    "actionName": "Start My Instances",
    "actionType": "amazon-start-ec2-instance",
    "actionVersionId": "av-00000001",
    "managedInstanceId": "mi-00000001",
    "startDate": "2016-06-09T12:41:00Z",
    "timeZoneId": "UTC"
  }
]
```


# Actions

## Basics

* &#x20;[Action Types](/resources/actions/action-types)

## Methods

* [CreateAction](/resources/actions/createaction-method)
* [DeleteAction](/resources/actions/deleteaction-method)
* [ExecuteAction](/resources/actions/executeaction-method)
* [GetAction](/resources/actions/getaction-method)
* [ListActions](/resources/actions/listactions-method)
* [ModifyAction](/resources/actions/modifyaction-method)

## Objects

* [Action](/data-types/action-object)
* [ActionSchedule](/data-types/actionschedule-object)
* [DailyScheduleParameters](/data-types/scheduleparameters-object/dailyscheduleparameters-object)
* [HourlyScheduleParameters](/data-types/scheduleparameters-object/hourlyscheduleparameters-object)
* [NoneScheduleParameters](/data-types/scheduleparameters-object/nonescheduleparameters-object)
* [MonthlyScheduleParameters](/data-types/scheduleparameters-object/monthlyscheduleparameters-object)
* [WeekAndDay](/data-types/weekandday-object)
* [WeeklyScheduleParameters](/data-types/scheduleparameters-object/weeklyscheduleparameters-object)


# Action Types

The following list shows the `actionType` code for actions that can be created by the [CreateAction](/resources/actions/createaction-method) method.

When creating an action, specify the action type code in the `actionType` property.

## Amazon Web Services Actions

| Action Type                               | Code                                             | Parameters Object                                                                                                                                   |
| ----------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add Security Group Rule                   | amazon-add-security-group-rule                   | [AmazonAddSecurityGroupRuleParameters](/data-types/actionparameters-object/amazonaddsecuritygroupruleparameters-object)                             |
| Apply S3 Bucket Policy                    | amazon-apply-s3-bucket-policy                    | [AmazonApplyS3BucketPolicyParameters](/data-types/actionparameters-object/amazonapplys3bucketpolicyparameters-object)                               |
| Associate Elastic IP Address              | amazon-associate-elastic-ip-address              | [AmazonAssociateElasticIpParameters](/data-types/actionparameters-object/amazonassociateelasticipparameters-object)                                 |
| Attach IAM Role to EC2 Instances          | amazon-attach-iam-role-to-ec2-instances          | [AmazonAttachIamRoleToEc2InstancesParameters](/data-types/actionparameters-object/amazonattachiamroletoec2instancesparameters-object)               |
| Backup EC2 Instance                       | amazon-backup-ec2-instance                       | [AmazonBackupEc2InstanceParameters](/data-types/actionparameters-object/amazonbackupec2instanceparameters-object)                                   |
| Backup EC2 Instances                      | amazon-backup-ec2-instances                      | [AmazonBackupEc2InstancesParameters](/data-types/actionparameters-object/amazonbackupec2instancesparameters-object)                                 |
| Backup MySQL Server                       | amazon-backup-mysql-server                       | [AmazonBackupMySQLServerParameters](/data-types/actionparameters-object/amazonbackupmysqlserverparameters-object)                                   |
| Backup Route 53 Hosted Zone               | amazon-backup-route53-hosted-zone                | [AmazonBackupRoute53HostedZoneParameters](/data-types/actionparameters-object/amazonbackuproute53hostedzoneparameters-object)                       |
| Backup Route 53 Hosted Zones              | amazon-backup-route53-hosted-zones               | [AmazonBackupRoute53HostedZonesParameters](/data-types/actionparameters-object/amazonbackuproute53hostedzonesparameters-object)                     |
| Change DynamoDB Tables                    | amazon-change-dynamodb-tables                    | [AmazonChangeDynamoDbTablesParameters](/data-types/actionparameters-object/amazonchangedynamodbtablesparameters-object)                             |
| Change EBS Volumes                        | amazon-change-ebs-volumes                        | [AmazonChangeEbsVolumesParameters](/data-types/actionparameters-object/amazonchangeebsvolumesparameters-object)                                     |
| Change EC2 Instance Type                  | amazon-change-ec2-instance-type                  | [AmazonChangeEc2InstanceTypeParameters](/data-types/actionparameters-object/amazonchangeec2instancetypeparameters-object)                           |
| Change EC2 Instances                      | amazon-change-ec2-instances                      | [AmazonChangeEc2InstancesParameters](/data-types/actionparameters-object/amazonchangeec2instancesparameters-object)                                 |
| Change RDS Instance Class                 | amazon-change-rds-instance-class                 | [AmazonChangeRdsInstanceClassParameters](/data-types/actionparameters-object/amazonchangerdsinstanceclassparameters-object)                         |
| Check Root Access Keys                    | amazon-check-root-access-keys                    | [AmazonCheckRootAccessKeysParameters](/data-types/actionparameters-object/amazoncheckrootaccesskeysparameters-object)                               |
| CloudFormation Stack Drift Report         | amazon-cloudformation-stack-drift-report         | [AmazonCloudFormationStackDriftReportParameters](/data-types/actionparameters-object/amazoncloudformationstackdriftreportparameters-object)         |
| Copy AMI Images                           | amazon-copy-ami-images                           | [AmazonCopyAmiImagesParameters](/data-types/actionparameters-object/amazoncopyamiimagesparameters-object)                                           |
| Copy EBS Snapshots                        | amazon-copy-ebs-snapshots                        | [AmazonCopyEbsSnapshotsParameters](/data-types/actionparameters-object/amazoncopyebssnapshotsparameters-object)                                     |
| Copy EBS Volume                           | amazon-copy-ebs-volume                           | [AmazonCopyEbsVolumeParameters](/data-types/actionparameters-object/amazoncopyebsvolumeparameters-object)                                           |
| Copy EC2 Instance                         | amazon-copy-ec2-instance                         | [AmazonCopyEc2InstanceParameters](/data-types/actionparameters-object/amazoncopyec2instanceparameters-object)                                       |
| Copy RDS Snapshots                        | amazon-copy-rds-snapshots                        | [AmazonCopyRdsSnapshotsParameters](/data-types/actionparameters-object/amazoncopyrdssnapshotsparameters-object)                                     |
| Copy S3 Objects                           | amazon-copy-s3-objects                           | [AmazonCopyS3ObjectsParameters](/data-types/actionparameters-object/amazoncopys3objectsparameters-object)                                           |
| Create AMI Image                          | amazon-create-ami-image                          | [AmazonCreateAmiImageParameters](/data-types/actionparameters-object/amazoncreateamiimageparameters-object)                                         |
| Create AMI Images                         | amazon-create-ami-images                         | [AmazonCreateAmiImagesParameters](/data-types/actionparameters-object/amazoncreateamiimagesparameters-object)                                       |
| Create CloudFormation Stack               | amazon-create-cloudformation-stack               | [AmazonCreateCloudFormationStackParameters](/data-types/actionparameters-object/createcloudformationstackparameters-object)                         |
| Create CloudTrail Trails                  | amazon-create-cloudtrail-trails                  | [AmazonCreateCloudTrailTrailsParameters](/data-types/actionparameters-object/amazoncreatecloudtrailtrailsparameters-object)                         |
| Create Directory Service Snapshots        | amazon-create-directory-service-snapshots        | [AmazonCreateDirectoryServiceSnapshotsParameters](/data-types/actionparameters-object/amazoncreatedirectoryservicesnapshotsparameters-object)       |
| Create DynamoDB Backups                   | amazon-create-dynamodb-backups                   | [AmazonCreateDynamoDbBackupsParameters](/data-types/actionparameters-object/amazoncreatedynamodbbackupsparameters-object)                           |
| Create EBS Snapshot                       | amazon-create-ebs-snapshot                       | [AmazonCreateEbsSnapshotParameters](/data-types/actionparameters-object/amazoncreateebssnapshotparameters-object)                                   |
| Create EBS Snapshots                      | amazon-create-ebs-snapshots                      | [AmazonCreateEbsSnapshotsParameters](/data-types/actionparameters-object/amazoncreateebssnapshotsparameters-object)                                 |
| Create ElastiCache Cluster                | amazon-create-elasticache-cluster                | [AmazonCreateElastiCacheClusterParameters](/data-types/actionparameters-object/amazoncreateelasticacheclusterparameters-object)                     |
| Create ElastiCache ReadReplica            | amazon-create-elasticache-read-replica           | [AmazonCreateElastiCacheReadReplicaParameters](/data-types/actionparameters-object/amazoncreateelasticachereadreplicaparameters-object)             |
| Create ElastiCache Snapshots              | amazon-create-elasticache-snapshots              | [AmazonCreateElastiCacheSnapshotsParameters](/data-types/actionparameters-object/amazoncreateelasticachesnapshotsparameters-object)                 |
| Create Lightsail Instances from Snapshots | amazon-create-lightsail-instances-from-snapshots | [AmazonCreateLightsailInstancesFromSnapshotsParameters](/data-types/actionparameters-object/createlightsailinstancesfromsnapshotsparameters-object) |
| Create Lightsail Instance Snapshots       | amazon-create-lightsail-instance-snapshots       | [AmazonCreateLightsailInstanceSnapshotsParameters](/data-types/actionparameters-object/amazoncreatelightsailinstancesnapshotsparameters-object)     |
| Create RDS Read Replica                   | amazon-create-rds-read-replica                   | [AmazonCreateRdsReadReplicaParameters](/data-types/actionparameters-object/amazoncreaterdsreadreplicaparameters-object)                             |
| Create RDS Snapshot                       | amazon-create-rds-snapshot                       | [AmazonCreateRdsSnapshotParameters](/data-types/actionparameters-object/amazoncreaterdssnapshotparameters-object)                                   |
| Create RDS Snapshots                      | amazon-create-rds-snapshots                      | [AmazonCreateRdsSnapshotsParameters](/data-types/actionparameters-object/amazoncreaterdssnapshotsparameters-object)                                 |
| Create Redshift Snapshot                  | amazon-create-redshift-snapshot                  | [AmazonCreateRedshiftSnapshotParameters](/data-types/actionparameters-object/amazoncreateredshiftsnapshotparameters-object)                         |
| Delete EBS Snapshots                      | amazon-delete-ebs-snapshots                      | [AmazonDeleteEbsSnapshotsParameters](/data-types/actionparameters-object/amazondeleteebssnapshotsparameters-object)                                 |
| Delete EBS Volumes                        | amazon-delete-ebs-volumes                        | [AmazonDeleteEbsVolumesParameters](/data-types/actionparameters-object/amazondeleteebsvolumesparameters-object)                                     |
| Delete RDS Snapshots                      | amazon-delete-rds-snapshots                      | [AmazonDeleteRdsSnapshotsParameters](/data-types/actionparameters-object/amazondeleterdssnapshotsparameters-object)                                 |
| Deregister AMI Images                     | amazon-deregister-ami-images                     | [AmazonDeregisterAmiImagesParameters](/data-types/actionparameters-object/amazonderegisteramiimagesparameters-object)                               |
| Disable Unused IAM Access Keys            | amazon-disable-unused-iam-access-keys            | [AmazonDisableUnusedIamAccessKeysParameters](/data-types/actionparameters-object/amazondisableunusediamaccesskeysparameters-object)                 |
| Export DynamoDB Tables                    | amazon-export-dynamodb-tables                    | [AmazonExportDynamoDbTablesParameters](/data-types/actionparameters-object/amazonexportdynamodbtablesparameters-object)                             |
| Request EC2 Spot Instances                | amazon-request-ec2-spot-instances                | [AmazonRequestEc2SpotInstancesParameters](/data-types/actionparameters-object/amazonrequestec2spotinstancesparameters-object)                       |
| Send SSM Command                          | amazon-send-ssm-command                          | [AmazonSendSsmCommandParameters](/data-types/actionparameters-object/amazonsendssmcommandparameters-object)                                         |
| Start EC2 Instance                        | amazon-start-ec2-instance                        | [AmazonStartEc2InstanceParameters](/data-types/actionparameters-object/amazonstartec2instanceparameters-object)                                     |
| Start EC2 Instances                       | amazon-start-ec2-instances                       | [AmazonStartEc2InstancesParameters](/data-types/actionparameters-object/amazonstartec2instancesparameters-object)                                   |
| Tag EBS Snapshots                         | amazon-tag-ebs-snapshots                         | [AmazonTagEbsSnapshotsParameters](/data-types/actionparameters-object/amazontagebssnapshotsparameters-object)                                       |
| Update Auto Scaling Groups                | amazon-update-auto-scaling-groups                | [AmazonUpdateAutoScalingGroupsParameters](/data-types/actionparameters-object/amazonupdateautoscalinggroupsparameters-object)                       |
| Update ECS Services                       | amazon-update-ecs-services                       | [AmazonUpdateEcsServicesParameters](/data-types/actionparameters-object/amazonupdateecsservicesparameters-object)                                   |

## Google Cloud Platform Actions

| Action Type                    | Code                                  | Parameters Object                                                                                                                     |
| ------------------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Resize Managed Instance Groups | google-resize-managed-instance-groups | [GoogleResizeManagedInstanceGroupsParameters](/data-types/actionparameters-object/googleresizemanagedinstancegroupsparameters-object) |
| Start VM Instances             | google-start-vm-instances             | [GoogleStartVmInstancesParameters](/data-types/actionparameters-object/googlestartvminstancesparameters-object)                       |
| Start Cloud SQL Instances      | google-start-cloud-sql-instances      | [GoogleStartCloudSqlInstancesParameters](/data-types/actionparameters-object/googlestartcloudsqlinstancesparameters-object)           |


# CreateAction Method

## Description

Creates a new action.

## HTTP Request

`POST https://api.skeddly.com/api/Actions/`

## Body

The body is a JSON structure with the following properties.

### actionType

Type of action to create.

Type: `string`

Valid Values: One of the codes listed in the [Action Types](/resources/actions/action-types) table.

Required: Yes

### comments

User notes for the action.

Type: `string`

Required: No

### isEnabled

True to indicate that the action is executable. False otherwise.

Type: `boolean`

Required: No

Default: `false`

### isTriggerBySns

True to indicate that the action should be triggerable by an SNS topic.

Type: `boolean`

Required: No

Default: `false`

### name

Name of the action.

Type: `string`

Required: Yes

### parameters

Additional action parameters specific to the action type.

Type: [ActionParameters](/data-types/actionparameters-object) object.

Required: Yes

### projectId

The ID of the project in which to create the action.

Type: `string`

Required: Recommended for future compatability

Default Value: The account's default project.

### schedule

Schedule for the action.

Type: [ActionSchedule](/data-types/actionschedule-object) object

Required: Yes

### tags

Tags for the action.

Type: array of `string`

Required: No

## Returns

An [Action](/data-types/action-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Actions/ HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>

{
    "name": "My action",
    "actionType": "amazon-backup-ec2-instances",
    "isEnabled": true,
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2018-02-26",
        "timeOfDay": "12:05:00",
        "endDate": "2018-02-28",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday", "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Actions/"
  -H "Authorization: AccessKey <api key>"
  -d name="My action" \
  -d actionType=amazon-backup-ec2-instances \
  -d isEnabled=true \
  -d schedule.scheduleType=daily \
  -d schedule.startDate=2018-02-26 \
  -d schedule.timeOfDay="12:05:00" \
  -d schedule.endDate=2018-02-28 \
  -d schedule.timeZoneId="Eastern Standard Time"\
  -d schedule.parameters.days[]=monday \
  -d schedule.parameters.days[]=friday \
  -d parameters.credentialIds[]=cred-4d1a201c \
  -d parameters.regionNames[]=us-east-1 \
  -d parameters.instanceIdentificationMethod=all-instances \
  -d parameters.ConsistencyMethod=none \
  -d parameters.Description="backups-$(DATE)" \
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
action = client.create_action(
    actionType = "amazon-start-ec2-instances",
    name = "Start Development Instances",
    isEnabled = True,
    schedule = {
        "scheduleType": "daily",
        "startDate": "2019-01-01",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    parameters = {
        "CredentialIds": [
            "cred-12345678"
        ],
        
        "instanceIdentificationMethod": "all-instances",
        "isStop": True
    }
)
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionId": "a-00000001",
    "actionType": "amazon-backup-ec2-instances",
    "actionVersionId": "av-00000001",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "name": "My action",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}
```


# DeleteAction Method

## Description

Deletes an action.

## HTTP Request

`DELETE https://api.skeddly.com/api/Actions/<id>`

## URL Parameters

### id

ID of the action to delete.

Type: `string`

Required: Yes

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/Actions/a-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/Actions/a-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
action = client.delete_action("a-12345678")
```

{% endtab %}
{% endtabs %}


# ExecuteAction Method

## Description

Executes an existing action. The action must be enabled.

## HTTP Request

`PUT https://api.skeddly.com/api/Actions/<id>/Execute`

## URL Parameters

### id

The ID of the action.

Type: `string`

Required: Yes

## Returns

An [ActionExecution](/data-types/actionexecution-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Actions/a-00000001/Execute HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Actions/a-00000001/Execute"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
execution = client.execute_action("a-12345678")
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionExecutionId": "ae-00000001",
    "status": "running",
    "startDate": "2016-06-01T12:00:00Z",
    "trigger": "user",
    "actionId": "a-00000001",
    "actionVersionId": "av-00000001",
    "actionType": "amazon-start-ec2-instance",
    "actionName": "Start My Instances",
    "timeZoneId": "UTC",
    "credentialId": "cred-00000001"
}
```


# GetAction Method

## Description

Retrieves the latest version of an action, or a specific version of an action.

## HTTP Request

`GET https://api.skeddly.com/api/Actions/<id>`

## URL Parameters

### id

Action ID or Action Version ID of the action to return. When specifying an action ID for `id`, the latest version of the action will be returned. When specifying an action version ID for `id`, the specified version will be returned.

Type: `string`

Required: Yes

## Query Parameters

### include

A comma-separated list of extra data to include

Type: `string`

Valid Values:

* `displayData`
* `lastExecution`
* `parameters`

Required: No

## Returns

An [Action](/data-types/action-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Actions/a-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Actions/a-00000001"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
action = client.get_action("a-12345678")
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionId": "a-00000001",
    "actionType": "amazon-start-ec2-instances",
    "actionVersionId": "av-00000001",
    "comments": "Comments about this action",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "managedInstanceId": "mi-00000001",
    "name": "Start My Instances",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "projectId": "proj-00000001",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    "tags": [
        "cost-reduction"
    ]
}
```


# ListActions Method

## Description

Retrieves the list of actions.

## HTTP Request

`GET https://api.skeddly.com/api/Actions`

## Query Parameters

### include

A comma-separated list of extra data to include.

Type: `string`

Valid Values:

* `displayData`
* `lastExecution`
* `parameters`
* `runningCount`

Required: No

### filter.actionClasses

A comma-separated list of types of actions.

Type: `string`

Value Values:

* `standard`
* `managedInstances`

Required: No

### filter.actionTypes

A comma-separated list of action types.

Type: `string`

Required: No

### filter.credentialIds

A comma-separated list of credential IDs.

Type: `string`

Required: No

### filter.isEnabled

Include action that are enabled or disabled only.

Type: `boolean`

Required: No

### filter.managedInstanceIds

Comma-separated list of Managed Instance IDs.

Type: `string`

Required: No

### filter.projectIds

A comma-separated list of projects to include.

Type: `string`

Default: All projects

Required: No

### filter.regions

Comma-separated list of region system names.

Type: `string`

Required: No

### filter.tags

Comma-separated list of tags.

Type: `string`

Required: No

### filter.tagsRequired

Indicates whether all tags are required. Valid values include: any, all.

Type: `string`

Valid Values:

* `any`
* `all`

Required: No

Default: `any`

## Returns

Array of [Action](/data-types/action-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Actions HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Actions" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
actions = client.list_actions()
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "actionId": "a-00000001",
    "actionType": "amazon-start-ec2-instances",
    "actionVersionId": "av-00000001",
    "comments": "Comments about this action",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "managedInstanceId": "mi-00000001",
    "name": "Start My Instances",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "projectId": "proj-00000001",
    "schedule": {
      "scheduleType": "daily",
      "startDate": "2016-06-10",
      "timeOfDay": "12:23:00",
      "timeZoneId": "Eastern Standard Time",
      "parameters": {
        "days": [
          "monday",
          "tuesday",
          "wednesday",
          "thursday",
          "friday"
        ]
      }
    },
    "tags": [
      "cost-reduction"
    ]
  }
]
```


# ModifyAction Method

## Description

Modifies an existing action. The action type cannot be modified for existing actions.

## HTTP Request

`PUT https://api.skeddly.com/api/Actions/{id}`

## URL Parameters

### id

The ID of the action.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### comments

User notes for the action.

Type: `string`

Required: No

### isEnabled

True to indicate that the action is executable. False otherwise.

Type: `boolean`

Required: No

Default: `false`

### isTriggerBySns

True to indicate that the action should be triggerable by an SNS topic.

Type: `boolean`

Required: No

Default: `false`

### name

Name of the action.

Type: `string`

Required: Yes

### parameters

Additional action parameters specific to the action type.

Type: [ActionParameters](/data-types/actionparameters-object) object.

Required: Yes

### schedule

Schedule for the action.

Type: [ActionSchedule](/data-types/actionschedule-object) object

Required: Yes

### tags

Tags for the action.

Type: array of `string`

Required: No

## Returns

An [Action](/data-types/action-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Actions/a-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>

{
    "name": "My action",
    "isEnabled": true,
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2018-02-26",
        "timeOfDay": "12:05:00",
        "endDate": "2018-02-28",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday", "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Actions/a-00000001"
  -H "Authorization: AccessKey <api key>"
  -d name="My action" \
  -d isEnabled=true \
  -d schedule.scheduleType=daily \
  -d schedule.startDate=2018-02-26 \
  -d schedule.timeOfDay="12:05:00" \
  -d schedule.endDate=2018-02-28 \
  -d schedule.timeZoneId="Eastern Standard Time"\
  -d schedule.parameters.days[]=monday \
  -d schedule.parameters.days[]=friday \
  -d parameters.credentialIds[]=cred-4d1a201c \
  -d parameters.regionNames[]=us-east-1 \
  -d parameters.instanceIdentificationMethod=all-instances \
  -d parameters.ConsistencyMethod=none \
  -d parameters.Description="backups-$(DATE)" \
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
action = client.modify_action(
    "a-12345678",
    name = "Start Development Instances",
    isEnabled = True,
    schedule = {
        "scheduleType": "daily",
        "startDate": "2019-01-01",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    parameters = {
        "CredentialIds": [
            "cred-12345678"
        ],
        
        "instanceIdentificationMethod": "all-instances",
        "isStop": True
    }
)
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionId": "a-00000001",
    "actionType": "amazon-backup-ec2-instances",
    "actionVersionId": "av-00000001",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "name": "My action",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "friday"
            ]
        }
    },
    "parameters": {    
        "credentialIds": [ "cred-4d1a201c" ],
        "regionNames": [ "us-east-1" ],

        "instanceIdentificationMethod": "all-instances",
        "ConsistencyMethod": "none",
        "Description": "backups-$(DATE)"
    }
}
```


# Credentials

## Methods

* [CreateCredential](/resources/credentials/createcredential-method)
* [CopyCredential](/resources/credentials/createcredential-method-1)
* [DeleteCredential](/resources/credentials/deletecredential-method)
* [GenerateAmazonIamRoleExternalId](/resources/credentials/generateamazoniamroleexternalid-method)
* [GenerateIamPolicy](/resources/credentials/generateiampolicy-method)
* [GetCredential](/resources/credentials/getcredential-method)
* [ListCredentials](/resources/credentials/listcredentials-method)
* [ModifyCredential](/resources/credentials/modifycredential-method)

## Objects

* [Credential](/data-types/credential-object)
* [AmazonIamRoleExternalId](/data-types/amazoniamroleexternalid-object)


# CreateCredential Method

## Description

Registers a cloud-provider credential to be used.

## HTTP Request

`POST https://api.skeddly.com/api/Credentials/`

## Body

The body is a JSON structure with the following properties.

### amazonIamAccessKey

Parameters for the Amazon IAM access key credential. Required when `credentialType` is `amazon-access-key`.

Type: [AmazonIamAccessKeyParameters](/data-types/amazoniamaccesskeyparameters-object) object.

Required: Conditional

### amazonIamRole

Parameters for the Amazon IAM role credential. Required when `credentialType` is `amazon-iam-role`.

Type: [AmazonIamRoleParameters](/data-types/amazoniamroleparameters-object) object.

Required: Conditional

### azureCredential

Parameters for the Azure credential. Required when `credentialType` is `azure-credential`.

Type: [AzureCredentialParameters](/data-types/azurecredentialparameters-object) object.

Required: Conditional

### cloudProviderSubTypeId

Cloud-provider sub-type ID.

Type: `string`

Valid Values:

* `amazon-standard`
* `amazon-govcloud-us`
* `amazon-china`
* `azure-global`
* `google-standard`

Required: Yes

### credentialType

Type of credential being registered.

Type: `string`

Required: Yes

Valid Values:

* `amazon-iam-role`
* `amazon-access-key`
* `azure-credential`
* `google-service-account-key`

### googleServiceAccountKey

Parameters for the Google Cloud Provider service account key credential. Required when `credentialType` is `google-service-account-key`.

Type: [GoogleServiceAccountKeyParameters](/data-types/googleserviceaccountkeyparameters-object) object.

Required: Conditional

### name

Friendly name for the credential.

Type: `string`

Required: Yes

### projectId

The ID of the project in which to create the credential.

Type: `string`

Required: Recommended for future compatability

Default Value: The account's default project.

## Returns

A [Credential](/data-types/credential-object) object.

## &#x20;Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Credentials HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "amazonIamRole": {
        "externalId": "skeddly-12345678",
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly"
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "credentialType": "amazon-iam-role",
    
    "name": "My Credential"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Credentials" \
  -H "Authorization: AccessKey <api key>" \
  -d amazonIamRole.externalId=skeddly-12345678 \
  -d amazonIamRole.roleArn="arn:aws:iam::123456789012:role/Skeddly" \
  -d cloudProviderSubTypeId=amazon-standard \
  -d credentialType=amazon-iam-role \
  -d name="My Credential"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "amazonIamRole": {
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly",
        "externalId": "skeddly-12345678"
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "createdDate": "2016-06-08T14:42:00Z",
    "credentialId": "cred-00000001",
    "credentialType": "amazon-iam-role",
    "isUsedForSnsNotifications": false,
    "lastModifiedDate": "2016-06-08T14:42:00Z",
    "lastModifiedBy": "u-00000001",
    "name": "My Credential",
    "status": "active"
}
```


# CopyCredential Method

## Description

Copies a cloud-provider credential, within a project, or from one project to another.

## HTTP Request

`POST https://api.skeddly.com/api/Credentials/Copy`

## Body

The body is a JSON structure with the following properties.

### credentialId

Credential ID of the source credential to be copied. This credential can be in the same project or different project from `projectid`.

Type: `string`

Required: Yes

### nameOverride

Name of the new credential. The name of the source credential will be used if omitted.

Type: `string`

Required: No

### projectId

Project ID of the project into which the new copy will be contained.

Type: `string`

Required: Yes

## Returns

A [Credential](/data-types/credential-object) object.

## &#x20;Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Credentials/Copy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "projectId": "proj-12345678",
    "credentialId": "cred-12345678",
    "nameOverride": "Copy of My Credential"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Credentials/Copy" \
  -H "Authorization: AccessKey <api key>" \
89012:role/Skeddly" \
  -d projectId=proj-12345678 \
  -d credentialId=cred-12345678 \
  -d name="Copy of My Credential"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "amazonIamRole": {
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly",
        "externalId": "skeddly-12345678"
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "createdDate": "2016-06-08T14:42:00Z",
    "credentialId": "cred-00000001",
    "credentialType": "amazon-iam-role",
    "isUsedForSnsNotifications": false,
    "lastModifiedDate": "2016-06-08T14:42:00Z",
    "lastModifiedBy": "u-00000001",
    "name": "Copy of My Credential",
    "projectId": "proj-12345678",
    "status": "active"
}
```


# DeleteCredential Method

## Description

Deletes a cloud-provider credential.

## HTTP Request

`DELETE https://api.skeddly.com/api/Credentials/<id>`

## URL Parameters

### id

ID of the credential.

Type: `string`

Required: Yes

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/Credentials/cred-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/Credentials/cred-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}


# GenerateIamPolicy Method

## Description

Generates an Amazon IAM policy document for an Amazon credential.

## HTTP Request

`GET https://api.skeddly.com/api/Credentials/<id>/IamPolicy`

## URL Parameters

### id

ID of the credential.

Type: `string`

Required: Yes

## Query Parameters

### extras

Comma-separated list of extra data to include.

Type: `string`

Valid Values:

* `my-resources`

Required: No

## Returns

A JSON string containing an IAM policy document.

The IAM policy document is in JSON format, but it is encased in a JSON string.

Deserialize the response body as a JSON string. Then, if required, deserialize the string contents as an Amazon IAM policy document.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Credentials/cred-00000001/IamPolicy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Credentials/cred-00000001/IamPolicy" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
"{
    \"Version\": \"2012-10-17\",
    \"Statement\": [
        {
            \"Effect\": \"Allow\",
            \"Action\": [
                \"ec2:DescribeInstances\",
                \"ec2:StartInstances\"
            ],
            \"Resource\": \"*\"
        }
    ]
}"
```


# GenerateAmazonIamRoleExternalId Method

## Description

Generates an external ID to be used for an Amazon IAM Role.

## HTTP Request

`GET https://api.skeddly.com/api/Credentials/GenerateAmazonIamRoleExternalId`

## Query Parameters

### projectId

The ID of the project in which to generate the Amazon external ID.

Type: `string`

Default: Default project

Required: No

## Returns

An [AmazonIamRoleExternalId](/data-types/amazoniamroleexternalid-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Credentials/GenerateAmazonIamRoleExternalId HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Credentials/GenerateAmazonIamRoleExternalId" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "expiryDate": "2016-06-07T20:21:00Z",
    "externalId": "skeddly-12345678"
}
```


# GetCredential Method

## Description

Retrieves information for a credential.

## HTTP Request

`GET https://api.skeddly.com/api/Credentials/<id>`

## URL Parameters

### id

ID of the credential to retrieve.

Type: `string`

Required: Yes

## Query Parameters

### filter.isIncludeDeleted

Indicates whether deleted credentials can be returned.

Type: `boolean`

Required: No

Default: `false`

## Returns

A [Credential](/data-types/credential-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Credentials/cred-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Credentials/cred-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "actionIds": [
        "a-00000001"
    ],
    "amazonIamRole": {
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly",
        "externalId": "skeddly-12345678"
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "createdDate": "2016-06-08T14:42:00Z",
    "credentialId": "cred-00000001",
    "credentialType": "amazon-iam-role",
    "isUsedForSnsNotifications": false,
    "lastModifiedDate": "2016-06-08T14:42:00Z",
    "lastModifiedBy": "u-00000001",
    "managedInstanceIds": [
        "mi-00000001"
    ],
    "name": "My Credential",
    "projectId": "proj-00000001",
    "status": "active"
}
```


# ListCredentials Method

## Description

Retrieves the list of credentials.

## HTTP Request

`GET https://api.skeddly.com/api/Credentials`

## Query Parameters

### filter.credentialIds

A comma-separated list of credential IDs.

Type: `string`

### filter.isIncludeDeleted

Indicates whether to include deleted credentials in the result or not.

Type: `boolean`

Default: false

### filter.projectIds

A comma-separated list of projects to include.

Type: `string`

Default: All projects

Required: No

## Returns

Array of [Credential](/data-types/credential-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Credentials HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Credentials" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}

{% tab title="Python" %}

```python
import skeddly
client = skeddly.Client()
credentials = client.list_credentials()
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
    {
        "actionIds": [
            "a-00000001"
        ],
        "amazonIamRole": {
             "roleArn": "arn:aws:iam::123456789012:role/Skeddly",
             "externalId": "skeddly-12345678"
        },
        "cloudProviderSubTypeId": "amazon-standard",
        "createdDate": "2016-06-08T14:42:00Z",
        "credentialId": "cred-00000001",
        "credentialType": "amazon-iam-role",
        "isUsedForSnsNotifications": false,
        "lastModifiedDate": "2016-06-08T14:42:00Z",
        "lastModifiedBy": "u-00000001",
        "managedInstanceIds": [
            "mi-00000001"
        ],
        "name": "My Credential",
        "projectId": "proj-00000001",
        "status": "active"
    }
]
```


# ModifyCredential Method

## Description

Updates an existing cloud-provider credential.

## HTTP Request

`PUT https://api.skeddly.com/api/Credentials/<id>`

## URL Parameters

### Id

ID of the credential.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties. All body parameters are optional. Only properties being modified are required.

### amazonIamAccessKey

Parameters for the IAM access key credential. Required when `credentialType` is `amazon-access-key`.

Type: [AmazonIamAccessKeyParameters](/data-types/amazoniamaccesskeyparameters-object) object.

Required: Conditional

### amazonIamRole

Parameters for the IAM role credential. Required when `credentialType` is `amazon-iam-role`.

Type: [AmazonIamRoleParameters](/data-types/amazoniamroleparameters-object) object.

Required: Conditional

### cloudProviderSubTypeId

Cloud-provider sub-type ID.

Type: `string`

Valid Values:

* `amazon-standard`
* `amazon-govcloud-us`
* `amazon-china`
* `google-standard`

Required: Yes

### googleServiceAccountKey

Parameters for the Google Cloud Provider service account key credential. Required when `credentialType` is `google-service-account-key`.

Type: [GoogleServiceAccountKeyParameters](/data-types/googleserviceaccountkeyparameters-object) object.

Required: Conditional

### name

Updated friendly name for the credential.

Type: `string`

Required: No

## Returns

A [Credential](/data-types/credential-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Credentials/cred-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "amazonIamRole": {
        "externalId": "skeddly-12345678",
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly"
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "name": "My Credential"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Credentials/cred-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d amazonIamRole.externalId=skeddly-12345678 \
  -d amazonIamRole.roleArn="arn:aws:iam::123456789012:role/Skeddly" \
  -d cloudProviderSubTypeId=amazon-standard \
  -d name="My Credential"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "amazonIamRole": {
        "roleArn": "arn:aws:iam::123456789012:role/Skeddly",
        "externalId": "skeddly-12345678",
    },
    "cloudProviderSubTypeId": "amazon-standard",
    "createdDate": "2016-06-08T14:42:00Z",
    "credentialId": "cred-00000001",
    "credentialType": "amazon-iam-role",
    "isUsedForSnsNotifications": false,
    "lastModifiedDate": "2016-06-08T14:42:00Z",
    "lastModifiedBy": "u-00000001",
    "name": "My Credential",
    "status": "active"
}
```


# Managed Policies

## Methods

* [GetManagedPolicy](/resources/managed-policies/getmanagedpolicy-method)
* [ListManagedPolicy](https://github.com/skeddly/skeddly-api/tree/6d02f9b6e3bedba66e16a6fb9e2503d33556f127/managed-policies/ListManagedPolicy-method.md)

## Objects

* [ManagedPolicy](/data-types/managedpolicy-object)


# GetManagedPolicy Method

## Description

Retrieves information for a single Skeddly managed policy.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedPolicies/<id>`

## URL Parameters

### id

ID of the managed policy to retrieve.

Required: Yes

## Returns

A [ManagedPolicy](/data-types/managedpolicy-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedPolicies/full HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedPolicies/full"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "managedPolicyId": "full",
    "name": "Full Access"
}
```


# ListManagedPolicies Method

## Description

Retrieves the list of available Skeddly managed policies.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedPolicies`

## Returns

Array of [ManagedPolicy](/data-types/managedpolicy-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedPolicies HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedPolicies"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
    {
        "managedPolicyId": "full",
        "name": "Full Access"
    }
]
```


# Managed Services

## Description

Managed Services Plans are comprised of two parts:

* Plans (the schedule and parameters), and
* Selectors (the resources).

First create a plan, then create selectors to add resources to your plan.

## Methods

* [CreateManagedServicesPlan](/resources/managed-services/createmanagedservicesplan-method)
* [CreateManagedServicesSelector](/resources/managed-services/createmanagedservicesselector-method)
* [DeleteManagedServicesPlan](/resources/managed-services/deletemanagedservicesplan-method)
* [DeleteManagedServicesSelector](/resources/managed-services/deletemanagedservicesselector-method)
* [GetManagedServicesPlan](/resources/managed-services/getmanagedservicesplan-method)
* [GetManagedServicesSelector](/resources/managed-services/getmanagedservicesselector-method)
* [ListManagedServicesPlans](/resources/managed-services/listmanagedservicesplans-method)
* [ListManagedServicesSelectors](/resources/managed-services/listmanagedservicesselectors-method)
* [ModifyManagedServicesPlan](/resources/managed-services/modifymanagedservicesplan-method)
* [ModifyManagedServicesSelector](/resources/managed-services/modifymanagedservicesselector-method)

## Objects

* [ManagedServicesGroupIdComparison](/data-types/managedservicesgroupidcomparison-object)
* [ManagedServicesPlan](/data-types/managedservicesplan-object)
* [ManagedServicesPlanParameters](/data-types/managedservicesplanparameters-object)
* [ManagedServicesPlanSchedule](/data-types/managedservicesplanschedule-object)
* [ManagedServicesResourceIdComparison](/data-types/managedservicesresourceidcomparison-object)
* [ManagedServicesResourceTagComparison](/data-types/managedservicesresourcetagcomparison-object)
* [ManagedServicesSelector](/data-types/managedservicesselector-object)
* [ManagedServicesStartStopPlanParameters](/data-types/managedservicesplanparameters-object/managedservicesstartstopplanparameters-object)


# CreateManagedServicesPlan Method

## Description

Creates a Managed Services Plan.

## HTTP Request

`POST https://api.skeddly.com/api/ManagedServices/Plans/`

## Body

The body is a JSON structure with the following properties.

### isEnabled

Indicates whether the plan is enabled.

Type: `bool`

Required: No

Default Value: `false`

### name

Friendly name for the plan.

Type: `string`

Required: Yes

### parameters

Additional parameters for the plan. The object value is dependent on the value of `planType`.

Type: [ManagedServicesPlanParameters](/data-types/managedservicesplanparameters-object) object.

Required: Yes

### planType

Type of plan being registered.

Type: `string`

Required: Yes

Valid Values:

* `backup-plan`
* `start-stop-plan`

### projectId

The ID of the project in which to create the plan.

Type: `string`

Required: Recommended for future compatability

Default Value: The account's default project.

### schedule

Indicates the schedule for the plan

Type: [ManagedServicesPlanSchedule](/data-types/managedservicesplanschedule-object) object.

Required: Yes

## Returns

A [ManagedServicesPlan](/data-types/managedservicesplan-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/ManagedServices/Plans HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    "isEnabled": true,
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/ManagedServices/Plans" \
  -H "Authorization: AccessKey <api key>" \
  -d projectId=proj-00000001 \
  -d planType=start-stop-plan \
  -d name="Start Development Environment" \
  -d isEnabled=true \
  -d schedule.scheduleType=daily \
  -d schedule.timeOfDay="08:00:00" \
  -d schedule.timeZoneId="Eastern Standard Time" \
  -d schedule.parameters.days[0]=monday \
  -d schedule.parameters.days[1]=tuesday \
  -d schedule.parameters.days[2]=wednesday \
  -d schedule.parameters.days[3]=thursday \
  -d schedule.parameters.days[4]=friday \
  -d parameters.startStopMode=start-stop-combined \
  -d parameters.stopTimeInSeconds=43200
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    
    "state": "active",
    "isEnabled": true,
    "isDeleted": false,
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```


# CreateManagedServicesSelector Method

## Description

Creates a Managed Services Selector in a plan.

## HTTP Request

`POST https://api.skeddly.com/api/ManagedServices/Plans/<planId>/Selectors`

## URL Parameters

### planId

ID of the Managed Services Plan to that will contain the selector.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### credentialIds

Identifiers of the credentials used by the selector when matching resources.

Type: Array of `string`

Required: Yes

### groupIdComparisons

Group identifier comparisons used by the selector when matching resources. Only valid if `resourceType` is `azure-virtual-machine`.

Type: Array of [ManagedServicesGroupIdComparison](/data-types/managedservicesgroupidcomparison-object) objects

Required: No

### name

Name of the Managed Services Selector.

Type: `string`

Required: Yes

### regionNames

Regions/locations used by the selector when matching resources.

Type: Array of `string`

Required: No

### resourceIdComparisons

Resource identifier comparisons used by the selector when matching resources.

Type: Array of [ManagedServicesResourceIdComparison](/data-types/managedservicesresourceidcomparison-object) objects

Required: No

### resourceTagComparisons

Resource tag comparisons used by the selector when matching resources.

Type: Array of [ManagedServicesResourceTagComparison](/data-types/managedservicesresourcetagcomparison-object) objects

Required: No

### resourceIds

Resource identifiers used by the selector when matching resources.

Type: Array of `string`

Required: No

### resourceType

Type of resources that will be selected by the selector.

Type: `string`

Valid Values:

* `amazon-ec2-instance`
* `amazon-ebs-volume`
* `amazon-rds-instance`
* `amazon-rds-cluster`
* `amazon-documentdb-cluster`
* `amazon-lightsail-instance`
* `amazon-fsx-filesystem`
* `amazon-appstream-fleet`
* `amazon-redshift-cluster`
* `azure-virtual-machine`
* `google-vm-instance`
* `google-cloudsql-instance`

Required: Yes

### selectorCode

Unique code for the Managed Services Selector.

Type: `string`

Required: No

Default Value: Automatically generated `string`

## Returns

A [ManagedServicesSelector](/data-types/managedservicesselector-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/ManagedServices/Plans/plan-00000001/Selectors HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "Development EC2 Instances",
    
    "credentialIds": [
        "cred-00000001",
        "cred-00000002"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceTagComparisons": [
        {
            "tagName": "start-schedule",
            "compareType": "equals",
            "tagValue": "daily-0800"
        }
    ]
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001/Selectors" \
  -H "Authorization: AccessKey <api key>" \
  -d name="Development EC2 Instances" \
  -d credentialIds[0]=cred-00000001 \
  -d credentialIds[1]=cred-00000002 \
  -d resourceType=amazon-ec2-instances \
  -d resourceTagComparisons[0].tagName=start-schedule \
  -d resourceTagComparisons[0].compareType=equals \
  -d resourceTagComparisons[0].tagValue=daily-0800
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "selectorId": "selector-00000001",
    "name": "Development EC2 Instances",
    
    "state": "active",
    "syncState": "ready",
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "selectorCode": "0000000000000000",
    
    "credentialIds": [
        "cred-00000001",
        "cred-00000002"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceTagComparisons": [
        {
            "tagName": "start-schedule",
            "compareType": "equals",
            "tagValue": "daily-0800"
        }
    ]
}
```


# DeleteManagedServicesPlan Method

## Description

Deletes a Managed Services Plan.

## HTTP Request

`DELETE https://api.skeddly.com/api/ManagedServices/Plans/<id>`

## URL Parameters

### id

ID of the plan.

Type: `string`

Required: Yes

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/ManagedServices/Plans/plan-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001" \
  -H "Authorization: AccessKey <api key>"as
```

{% endtab %}
{% endtabs %}


# DeleteManagedServicesSelector Method

## Description

Deletes a Managed Services Selector.

## HTTP Request

`DELETE https://api.skeddly.com/api/ManagedServices/Plans/<planId>/Selectors/<selectorId>`

## URL Parameters

### planId

ID of the Managed Services Plan to that contains the selector to delete.

Type: `string`

Required: Yes

### selectorId

ID of the Managed Services Selector to delete.

Type: `string`

Required: Yes

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001" \
  -H "Authorization: AccessKey <api key>"as
```

{% endtab %}
{% endtabs %}


# GetManagedServicesPlan Method

## Description

Retrieves information for a Managed Services Plan.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedServices/Plans/<id>`

## URL Parameters

### id

ID of the Managed Services Plan to retrieve.

Type: `string`

Required: Yes

## Query Parameters

### isIncludeDeleted

Indicates whether deleted plans can be returned.

Type: `boolean`

Required: No

Default: `false`

## Returns

A [ManagedServicesPlan](/data-types/managedservicesplan-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedServices/Plans/plan-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    
    "state": "active",
    "isEnabled": true,
    "isDeleted": false,
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```


# GetManagedServicesSelector Method

## Description

Retrieves information for a Managed Services Selector.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedServices/Plans/<planId>/Selectors/<selectorId>`

## URL Parameters

### planId

ID of the Managed Services Plan to that contains the selector to retrieve.

Type: `string`

Required: Yes

### selectorId

ID of the Managed Services Selector to retrieve.

Type: `string`

Required: Yes

## Query Parameters

### isIncludeDeleted

Indicates whether deleted selectors can be returned.

Type: `boolean`

Required: No

Default: `false`

## Returns

A [ManagedServicesSelector](/data-types/managedservicesselector-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "selectorId": "selector-00000001",
    "name": "Development EC2 Instances",
    
    "state": "active",
    "syncState": "ready",
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "selectorCode": "0000000000000000",
    
    "credentialIds": [
        "cred-00000001",
        "cred-00000002"
    ],
    "regionNames": null,
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceTagComparisons": [
        {
            "tagName": "start-schedule",
            "compareType": "equals",
            "tagValue": "daily-0800"
        }
    ]
}
```


# ListManagedServicesPlans Method

## Description

Retrieves a list of Managed Services Plans.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedServices/Plans/`

## Query Parameters

### filter.isIncludeDeleted

Indicates whether deleted plans can be returned.

Type: `boolean`

Required: No

Default: `false`

### filter.planIds

A comma-separated list of plan IDs to include.

Type: `string`

Required: No

Default: All plans

### filter.planType

Indicates the type of plans to return.

Type: `string`

Allowed Values:

* `backup-plan`
* `start-stop-plan`

Required: No

Default: All plans

### filter.projectIds

A comma-separated list of project IDs to include.

Type: `string`

Required: No

Default: All projects

## Returns

Array of [ManagedServicesPlan](/data-types/managedservicesplan-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedServices/Plans/ HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedServices/Plans/" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

<pre class="language-javascript"><code class="lang-javascript"><strong>[
</strong><strong>    {
</strong>        "planId": "plan-00000001",
        "projectId": "proj-00000001",
        "planType": "start-stop-plan",
        "name": "Start Development Environment",
        
        "state": "active",
        "isEnabled": true,
        "isDeleted": false,
        
        "createdDate": "2023-02-13T00:00:00Z",
        "lastModifiedDate": "2023-02-14T00:00:00Z",
        "lastModifiedBy": "u-00000001",
        
        "schedule": {
            "scheduleType": "daily",
            "timeOfDay": "08:00:00",
            "timeZoneId": "Eastern Standard Time",
            "parameters": {
                "days": [
                    "monday",
                    "tuesday",
                    "wednesday",
                    "thursday",
                    "friday"
                ]
            }
        },
        
        "parameters": {
            "startStopMode": "start-stop-combined",
            "stopTimeInSeconds": 43200
        }
    }
]
</code></pre>


# ListManagedServicesSelectors Method

## Description

Retrieves a list of Managed Services Selectors from a plan.

## HTTP Request

`GET https://api.skeddly.com/api/ManagedServices/Plans/<planId>/Selectors`

## URL Parameters

### planId

ID of the Managed Services Plan to that contains the selectors to retrieve.

Type: `string`

Required: Yes

## Query Parameters

### filter.isIncludeDeleted

Indicates whether deleted plans can be returned.

Type: `boolean`

Required: No

Default: `false`

## Returns

Array of [ManagedServicesSelector](/data-types/managedservicesselector-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/ManagedServices/Plans/plan-00000001/Selectors HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001/Selectors" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

<pre class="language-javascript"><code class="lang-javascript"><strong>[
</strong><strong>    {
</strong>        "planId": "plan-00000001",
        "selectorId": "selector-00000001",
        "name": "Development EC2 Instances",
        
        "state": "active",
        "syncState": "ready",
        
        "createdDate": "2023-02-13T00:00:00Z",
        "lastModifiedDate": "2023-02-14T00:00:00Z",
        "lastModifiedBy": "u-00000001",
        
        "selectorCode": "0000000000000000",
        
        "credentialIds": [
            "cred-00000001",
            "cred-00000002"
        ],
        "regionNames": null,
        
        "resourceType": "amazon-ec2-instance",
        
        "resourceTagComparisons": [
            {
                "tagName": "start-schedule",
                "compareType": "equals",
                "tagValue": "daily-0800"
            }
        ]
    }
]
</code></pre>


# ModifyManagedServicesPlan Method

## Description

Updates an existing Managed Services Plan.

## HTTP Request

`PUT https://api.skeddly.com/api/ManagedServices/Plans/<id>`

## URL Parameters

### Id

ID of the plan.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### isEnabled

Indicates whether the plan is enabled.

Type: `bool`

Required: No

Default Value: `false`

### name

Friendly name for the plan.

Type: `string`

Required: Yes

### parameters

Additional parameters for the plan. The object value is dependent on the value of `planType`.

Type: [ManagedServicesPlanParameters](/data-types/managedservicesplanparameters-object) object.

Required: Yes

### schedule

Indicates the schedule for the plan

Type: [ManagedServicesPlanSchedule](/data-types/managedservicesplanschedule-object) object.

Required: Yes

## Returns

A [ManagedServicesPlan](/data-types/managedservicesplan-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/ManagedServices/Plans/plan-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "Start Development Environment",
    "isEnabled": true,
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d name="Start Development Environment" \
  -d isEnabled=true \
  -d schedule.scheduleType=daily \
  -d schedule.timeOfDay="08:00:00" \
  -d schedule.timeZoneId="Eastern Standard Time" \
  -d schedule.parameters.days[0]=monday \
  -d schedule.parameters.days[1]=tuesday \
  -d schedule.parameters.days[2]=wednesday \
  -d schedule.parameters.days[3]=thursday \
  -d schedule.parameters.days[4]=friday \
  -d parameters.startStopMode=start-stop-combined \
  -d parameters.stopTimeInSeconds=43200
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "projectId": "proj-00000001",
    "planType": "start-stop-plan",
    "name": "Start Development Environment",
    
    "state": "active",
    "isEnabled": true,
    "isDeleted": false,
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "schedule": {
        "scheduleType": "daily",
        "timeOfDay": "08:00:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    
    "parameters": {
        "startStopMode": "start-stop-combined",
        "stopTimeInSeconds": 43200
    }
}
```


# ModifyManagedServicesSelector Method

## Description

Updates an existing Managed Services Selector.

## HTTP Request

`PUT https://api.skeddly.com/api/ManagedServices/Plans/<planId>/Selectors/<selectorId>`

## URL Parameters

### planId

ID of the Managed Services Plan to that contains the selector to retrieve.

Type: `string`

Required: Yes

### selectorId

ID of the Managed Services Selector to retrieve.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### credentialIds

Identifiers of the credentials used by the selector when matching resources.

Type: Array of `string`

Required: Yes

### groupIdComparisons

Group identifier comparisons used by the selector when matching resources. Only valid if `resourceType` is `azure-virtual-machine`.

Type: Array of [ManagedServicesGroupIdComparison](/data-types/managedservicesgroupidcomparison-object) objects

Required: No

### name

Name of the Managed Services Selector.

Type: `string`

Required: Yes

### regionNames

Regions/locations used by the selector when matching resources.

Type: Array of `string`

Required: No

### resourceIdComparisons

Resource identifier comparisons used by the selector when matching resources.

Type: Array of [ManagedServicesResourceIdComparison](/data-types/managedservicesresourceidcomparison-object) objects

Required: No

### resourceTagComparisons

Resource tag comparisons used by the selector when matching resources.

Type: Array of [ManagedServicesResourceTagComparison](/data-types/managedservicesresourcetagcomparison-object) objects

Required: No

### resourceIds

Resource identifiers used by the selector when matching resources.

Type: Array of `string`

Required: No

### resourceType

Type of resources that will be selected by the selector.

Type: `string`

Valid Values:

* `amazon-ec2-instance`
* `amazon-ebs-volume`
* `amazon-rds-instance`
* `amazon-rds-cluster`
* `amazon-documentdb-cluster`
* `amazon-lightsail-instance`
* `amazon-fsx-filesystem`
* `amazon-appstream-fleet`
* `amazon-redshift-cluster`
* `azure-virtual-machine`
* `google-vm-instance`
* `google-cloudsql-instance`

Required: Yes

### selectorCode

Unique code for the Managed Services Selector.

Type: `string`

Required: No

Default Value: Automatically generated `string`

## Returns

A [ManagedServicesSelector](/data-types/managedservicesselector-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "Development EC2 Instances",
    
    "credentialIds": [
        "cred-00000001",
        "cred-00000002"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceTagComparisons": [
        {
            "tagName": "start-schedule",
            "compareType": "equals",
            "tagValue": "daily-0800"
        }
    ]
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/ManagedServices/Plans/plan-00000001/Selectors/selector-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d name="Development EC2 Instances" \
  -d credentialIds[0]=cred-00000001 \
  -d credentialIds[1]=cred-00000002 \
  -d resourceType=amazon-ec2-instances \
  -d resourceTagComparisons[0].tagName=start-schedule \
  -d resourceTagComparisons[0].compareType=equals \
  -d resourceTagComparisons[0].tagValue=daily-0800
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "planId": "plan-00000001",
    "selectorId": "selector-00000001",
    "name": "Development EC2 Instances",
    
    "state": "active",
    "syncState": "ready",
    
    "createdDate": "2023-02-13T00:00:00Z",
    "lastModifiedDate": "2023-02-14T00:00:00Z",
    "lastModifiedBy": "u-00000001",
    
    "selectorCode": "0000000000000000",
    
    "credentialIds": [
        "cred-00000001",
        "cred-00000002"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceTagComparisons": [
        {
            "tagName": "start-schedule",
            "compareType": "equals",
            "tagValue": "daily-0800"
        }
    ]
}
```


# Projects

Projects are "containers" for credentials, actions, managed instances, and managed service plans.

## Notes

Once objects have been created in a project, they cannot be moved to another project.

## Methods

* [ArchiveProject](/resources/projects/archiveproject-method)
* [CreateProject](/resources/projects/createproject-method)
* [CreateProjectRss](/resources/projects/createprojectrss-method)
* [GetProject](/resources/projects/getproject-method)
* [ListProjects](/resources/projects/listprojects-method)
* [ModifyProject](/resources/projects/modifyproject-method)
* [ModifyProjectAccountNotifications](/resources/projects/modifyprojectaccountnotifications-method)
* [ModifyProjectReportEmails](/resources/projects/modifyprojectreportemails-method)

## Objects

* [Project](/data-types/project-object)
* [ProjectRssFeed](/data-types/projectrssfeed-object)
* [ProjectNotificationsSettings](/data-types/projectnotificationssettings-object)


# ArchiveProject Method

## Description

Archives an existing project.

Note: The default project cannot be archived.

## HTTP Request

`PUT https://api.skeddly.com/api/Projects/<id>/Archive`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Body

The body is empty.

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Projects/proj-00000001/Archive HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Projects/proj-00000001/Archive" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project New Name",
    "status": "archived",
    
    "isDefault": false,
    
    "createdDate": "2022-12-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678"
}
```


# CreateProject Method

## Description

Creates a new project in your Skeddly account.

## HTTP Request

`POST https://api.skeddly.com/api/Projects/`

## Body

The body is a JSON structure with the following properties.

### name

Name for the new project.

Type: `string`

Required: Yes

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Projects HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "My Project"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Projects" \
  -H "Authorization: AccessKey <api key>" \
  -d name="My Project"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2023-01-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678"
}
```


# CreateProjectNotification Method

## Description

Creates a new project notification.

## HTTP Request

`POST https://api.skeddly.com/api/Projects/<id>/Notifications`

## Body

The body is a JSON structure with the following properties.

### amazonSnsSettings

Email settings for the notification. Required when `notificationMethod` is `amazon-sns`.

Type: [ProjectNotificationAmazonSnsSettings](/data-types/projectnotificationamazonsnssettings-object) object

Required: Conditional

### emailSettings

Email settings for the notification. Required when `notificationMethod` is `email`.

Type: [ProjectNotificationEmailSettings](/data-types/projectnotificationemailsettings-object) object

Required: Conditional

### notificationLevel

Level of notification.

Type: `string`

Allowed Values:

* `all`
* `errors-only`

Required: Yes

### notificationMethod

Method of notification.

Type: `string`

Allowed Values:

* `email`
* `slack`
* `amazon-sns`

Required: Yes

### slackSettings

Slack settings for the notification. Required when `notificationMethod` is `slack`.

Type: [ProjectNotificationSlackSettings](/data-types/projectnotificationslacksettings-object) object

Required: Conditional

## Returns

A [ProjectNotification](/data-types/projectnotification-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Projects/proj-12345678/Notifications HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "notificationLevel": "errors-only",
    "notificationMethod": "email",
    "emailSettings": {
        "emailAddresses": [
            "user1@example.com"
        ]
    }
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Projects/proj-12345678/Notifications" \
  -H "Authorization: AccessKey <api key>" \
  -d notificationLevel="errors-only" \
  -d notificationMethod="email" \
  -d emailSettings.emailAddresses[0]="user1@example.com"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "notificationId": "pn-12345678",
    "createdDate": "2023-01-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678",
    
    "notificationLevel": "errors-only",
    "notificationMethod": "email",
    "emailSettings": {
        "emailAddresses": [
            "user1@example.com"
        ]
    }
}
```


# CreateProjectRss Method

## Description

Creates an RSS feed for a project. If an RSS feed already exists, the existing RSS feed information will be returned.

## HTTP Request

`POST https://api.skeddly.com/api/Projects/<id>/Rss`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Body

The body of the request is empty.

## Returns

A [ProjectRssFeed](/data-types/projectrssfeed-object) object.

## &#x20;Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Projects/proj-12345678/Rss HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Projects/proj-12345678/Rss" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "status": "active",
    "feedUrl": "https://rss.skeddly.com/"
}
```


# DeleteProjectNotification Method

## Description

Deletes an existing project notification.

## HTTP Request

`DELETE https://api.skeddly.com/api/Projects/<projectId>/Notification/<notificationId>`

## URL Parameters

### notificationId

ID of the project notification.

Type: `string`

Required: Yes

### projectId

ID of the project.

Type: `string`

Required: Yes

## Body

The body is empty.

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/Projects/proj-00000001/Notifications/pn-12345678 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/Projects/proj-00000001/Notifications/pn-12345678" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}


# GetProject Method

## Description

Returns information for an existing project

## HTTP Request

`GET https://api.skeddly.com/api/Projects/<id>`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Query Parameters

### include

A comma-separated list of extra data to include

Type: `string`

Valid Values:

* `notifications`
* `dailySummaries`

Required: No

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Projects/proj-12345678 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Projects/proj-12345678" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2023-01-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678"
}
```


# ListProjects Method

## Description

Retrieves the list of projects.

## HTTP Request

`GET https://api.skeddly.com/api/Projects`

## Query Parameters

The following query parameters are accepted.

### filter.status

A comma-separated list of statuses.

Type: `string`

Value Values:

* `active`
* `archived`

Required: No

## Returns

Array of [Project](/data-types/project-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Projects HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Projects"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "projectId": "proj-12345678",
    "name": "Customer 1",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2019-05-05T12:00:00:Z",
    "lastModifiedDate": "2020-01-21T14:00:00:Z",
    "lastModifiedBy": "u-12345678"
  }
]
```


# ModifyProject Method

## Description

Updates an existing project.

## HTTP Request

`PUT https://api.skeddly.com/api/Projects/<id>`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.&#x20;

### name

Updated name for the project.

Type: `string`

Required: Yes

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Projects/proj-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "name": "My Project New Name"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Projects/proj-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d name="My Project New Name"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project New Name",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2022-12-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678"
}
```


# ModifyProjectAccountNotifications Method

## Description

Modifies the account notification settings for a project.

## HTTP Request

`PUT https://api.skeddly.com/api/Projects/<id>/Notifications/AccountNotifications`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.&#x20;

### accountNotifications

Indicates whether account notifications should apply to this project.

Type: `string`

Valid Values:

* `allow`
* `block`

Required: Yes

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Projects/proj-00000001/Notifications/AccountNotifications HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "accountNotifications": "block"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Projects/proj-00000001/Notifications/AccountNotifications" \
  -H "Authorization: AccessKey <api key>" \
  -d accountNotifications=block
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2022-12-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678",
    
    "accountNotifications": "block"
}
```


# ModifyProjectReportEmails Method

## Description

Modifies the report emails for a project.

## HTTP Request

`PUT https://api.skeddly.com/api/Projects/<id>/ReportEmails`

## URL Parameters

### Id

ID of the project.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.&#x20;

### reportEmails

Emails to assign to the project

Type: Array of `string`

Required: Yes

## Returns

A [Project](/data-types/project-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Projects/proj-00000001/ReportEmails HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "reportEmails": [
        "user1@example.com"
    ]
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Projects/proj-00000001/ReportEmails" \
  -H "Authorization: AccessKey <api key>" \
  -d reportEmails[0]=user1@example.com
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "projectId": "proj-12345678",
    "name": "My Project",
    "status": "active",
    
    "isDefault": false,
    
    "createdDate": "2022-12-26T12:00:00:Z",
    "lastModifiedDate": "2023-01-26T12:00:00:Z",
    "lastModifiedBy": "u-12345678",
    
    "reportEmails": [
        "user1@example.com"
    ]
}
```


# Reports

## Methods

* [GetBackupsReport](/resources/reports/getbackupsreport-method)


# GetBackupsReport Method

## Description

Retrieves the backups report.

## HTTP Request

`GET https://api.skeddly.com/api/Reports/Backups`

## Query Parameters

### backupTypes

A comma-separated list of backup types to include.

Type: `string`

Valid Values:

* `amazon-ebs-snapshot`
* `amazon-ami-image`
* `amazon-rds-cluster-snapshot`
* `amazon-rds-snapshot`

Required: No

### credentialIds

A comma-separated list of credential IDs.

Type: `string`

Required: No

### projectIds

A comma-separated list of projects to include.

Type: `string`

Default: All projects

Required: Recommended for future compatability

### range.inclusiveStart

Start date (inclusive) of the date range, in ISO8601 format.

Type: `string`

Default: Now - 30 days

Required: No

### range.exclusiveEnd

End date (exclusive) of the date range, in ISO8601 format.

Type: `string`

Default: Now

Required: No

### regionNames

A comma-separated list of regions to include.

Type: `string`

Default: All regions

Required: No

## Returns

Array of [BackupsReportItem](/data-types/backupsreportitem-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Reports/Backups HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Reports/Backups" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "projectId": "proj-00000000",
    "createdDate": "2020-12-31T00:00:00Z",
    "regionName": "us-east-1",
    
    "backupType": "amazon-ami-image",
    "backupId": "ami-00000000",
    "backupSize": 30,
    
    "sourceType": "amazon-ec2-instance",
    "sourceId": "i-00000000",
    
    "actionExecutionId": "ae-00000000",
    
    "actionId": "a-00000000",
    "actionVersionId": "av-00000000",
    "actionName": "Backup Servers",
    
    "credentialId": "cred-00000000",
    "credentialName": "Cloud Account"
  }
]
```


# Regions

## Methods

* [GetRegion](/resources/regions/getregion-method)
* [ListRegions](/resources/regions/listregions-method)

## Objects

* [Region](/data-types/region-object)


# GetRegion Method

## Description

Retrieves a single region.

## HTTP Request

`GET https://api.skeddly.com/api/Regions/<regionName>`

## URL Parameters

### regionName

Region name of the region to retrieve.

Required: Yes

## Query Parameters

### include

Comma-separated list of extra data to include.

Valid Values: `availabilityZones`.

## Returns

A [Region](/data-types/region-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Regions/us-east-1 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Regions/us-east-1" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "availabilityZones": [
        "us-east-1a",
        "us-east-1b"
    ],
    "cloudProviderSubTypeId": "amazon-standard",
    "displayName": "N. Virginia",
    "regionName": "us-east-1"
}
```


# ListRegions Method

## Description

Retrieves the list of regions.

## HTTP Request

`GET https://api.skeddly.com/api/Regions`

## Query Parameters

The following query parameters are accepted. One and only one of `cloudProviderId`, `cloudProviderSubTypeId`, or `credentialId` must be specified.

### cloudProviderId

Comma-separated list of cloud-providers.

Valid Values: `amazon`.

Required: Conditional

### cloudProviderSubTypeId

Comma-separated list of cloud-provider sub-types.

Valid Values:

* `amazon-standard`
* `amazon-govcloud-us`
* `amazon-china`.

Required: Conditional

### credentialId

ID of a credential. Regions returned will be compatible with the specified credential.

Required: Conditional

### include

Comma-separated list of extra data to include.

Valid Values: `availabilityZones`.

Required: No

## Returns

Array of [Region](/data-types/region-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Regions HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Regions" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "availabilityZones": [
        "us-east-1a",
        "us-east-1b"
    ],
    "cloudProviderSubTypeId": "amazon-standard",
    "displayName": "N. Virginia",
    "regionName": "us-east-1"
  }
]
```


# Time Zones

## Methods

* [ListTimeZones](/resources/time-zones/listtimezones-method)

## Objects

* [TimeZone](/data-types/timezone-object)


# ListTimeZones Method

## Description

Retrieves the list of time zones.

## HTTP Request

`GET https://api.skeddly.com/api/TimeZones`

## Query Parameters

The following query parameters are accepted.

### timeZoneIds

Comma-separated list of time zone IDs to include.

Required: No

## Returns

Array of [TimeZone](/data-types/timezone-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/TimeZones HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/TimeZones"
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
  {
    "displayName": "(UTC-5:00) Eastern Standard Time",
    "timeZoneId": "Eastern Standard Time"
  }
]
```


# Users

## Methods

* [AttachManagedPolicy](/resources/users/attachmanagedpolicy-method)
* [CreateUser](/resources/users/createuser-method)
* [DeleteUser](/resources/users/deleteuser-method)
* [DetachManagedPolicy](/resources/users/detachmanagedpolicy-method)
* [GetUser](/resources/users/getuser-method)
* [ListUsers](/resources/users/listusers-method)
* [ModifyUser](/resources/users/modifyuser-method)
* [ModifyUserPassword](/resources/users/modifyuserpassword-method)
* [RemoveUserMfa](/resources/users/removeusermfa-method)

## Objects

* [User](/data-types/user-object)


# AttachManagedPolicy Method

## Description

Attaches a Skeddly managed policy to a user.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}/AttachManagedPolicy`

## URL Parameters

### id

ID of the user to which the managed policy is to be attached.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### managedPolicyId

ID of the managed policy to attach.

Type: `string`

Required: Yes

### projectId

ID of the project under which the policy is attached to the user.

Type: `string`

Required: No

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001/AttachManagedPolicy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "managedPolicyId": "full"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001/AttachManagedPolicy" \
  -H "Authorization: AccessKey <api key>" \
  -d managedPolicyId=full
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "managedPolicies": [
        {
            "managedPolicyId": "full",
            "name": "Full Access"
        }
    ],
    "mfaType": "none",
    "status": "disabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# CreateUser Method

## Description

Creates a user.

Usernames and email addresses must be unique across all users of all Skeddly accounts. Many email servers support "+ notation" to support unique passwords for a single inbox. For example, if the real email address was "<user@example.com>", then "<user+skeddly@example.com>" would forward to the same inbox. Essentially, everything between the "+" and "@" characters is ignored. Check with your IT team to see if your email servers support "+ notation".

## HTTP Request

`POST https://api.skeddly.com/api/Users/`

## Body

The body is a JSON structure with the following properties.

### emailAddress

Email address for the new user. It must not already be used by another user.

Type: `string`

Required: Yes

### managedPolicyIds

List of Managed Policy IDs to apply to the new user.

Type: Array of `string`

Required: No

### password

Password for the new user.

Type: `string`

Required: Yes

### username

Username for the new user.

Type: `string`

Required: Yes

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /api/Users HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "emailAddress": "user@example.com",
    "managedPolicyIds": [
        "full"
    ],
    "username": "user1",
    "password": "reallygoodpassword"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X POST "https://api.skeddly.com/api/Users" \
  -H "Authorization: AccessKey <api key>" \
  -d emailAddress="user@example.com" \
  -d username="user1" \
  -d password="reallygoodpassword" \
  -d managedPolicyIds[]=full
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "managedPolicies": [
        {
            "managedPolicyId": "full",
            "name": "Full Access"
        }
    ],
    "mfaType": "none",
    "status": "enabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# DeleteUser Method

## Description

Deletes an existing user.

## HTTP Request

`DELETE https://api.skeddly.com/api/Users/<id>`

## URL Parameters

### id

ID of the user to delete.

Type: `string`

Required: Yes

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /api/Users/u-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X DELETE "https://api.skeddly.com/api/Users/u-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}


# DetachManagedPolicy Method

## Description

Detaches a Skeddly managed policy from a user.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}/DetachManagedPolicy`

## URL Parameters

### id

ID of the user from which the managed policy is to be detached.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### managedPolicyId

ID of the managed policy to detach.

Type: `string`

Required: Yes

### projectId

ID of the project under which the policy is to be detached from the user.

Type: `string`

Required: No

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001/DetachManagedPolicy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "managedPolicyId": "full"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001/DetachManagedPolicy" \
  -H "Authorization: AccessKey <api key>" \
  -d managedPolicyId=full
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "managedPolicies": [
        {
            "managedPolicyId": "standard",
            "name": "Standard Access"
        }
    ],
    "mfaType": "none",
    "status": "disabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# GetUser Method

## Description

Retrieves information about a single user.

## HTTP Request

`GET https://api.skeddly.com/api/Users/<id>`

## URL Parameters

### id

ID of the user to retrieve.

Required: Yes

## Query Parameters

### include

A comma-separated list of extra extra data to include.

Type: `string`

Valid Values:

* `managedPolicies`

Required: No

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/User/u-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Users/u-00000001" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "mfaType": "google-auth",
    "status": "enabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# ListUsers Method

## Description

Retrieves the list of users

## HTTP Request

`GET https://api.skeddly.com/api/Users`

## Query Parameters

The following query parameters are accepted.

### include

A comma-separated list of extra extra data to include.

Type: `string`

Valid Values:

* `managedPolicies`

Required: No

## Returns

Array of [User](/data-types/user-object) objects.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /api/Users HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl "https://api.skeddly.com/api/Users" \
  -H "Authorization: AccessKey <api key>"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
[
    {
        "emailAddress": "user@example.com",
        "lastAccessDate": "2016-06-09T11:00:00Z",
        "mfaType": "google-auth",
        "status": "enabled",
        "userId": "u-00000001",
        "username": "user1"
    }
]
```


# ModifyUser Method

## Description

Modifies an existing user.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}`

## URL Parameters

### id

ID of the user to modify.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties. Only the values that are being modified are required.

### emailAddress

Email address for the new user. It must not already be used by another user.

Type: `string`

Required: No

### status

Updated status of the user.

Type: `string`

Valid Values:

* `enabled`
* `disabled`

Required: No

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001 HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "emailAddress": "user@example.com",
    "status": "disabled"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001" \
  -H "Authorization: AccessKey <api key>" \
  -d emailAddress="user@example.com" \
  -d status=disabled
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "mfaType": "none",
    "status": "disabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# ModifyUserPassword Method

## Description

Modifies an existing user's password.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}/Password`

## URL Parameters

### id

ID of the user whose password is to be modified.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### password

Updated password for the user.

Type: `string`

Required: Yes

## Returns

No content.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001/Password HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "password": "myreallystrongpassword"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001/Password " \
  -H "Authorization: AccessKey <api key>" \
  -d password="myreallystrongpassword"
```

{% endtab %}
{% endtabs %}


# RemoveUserMfa Method

## Description

Removes the MFA from a user.

## HTTP Request

`PUT https://api.skeddly.com/api/Users/{id}/RemoveMfa`

## URL Parameters

### id

ID of the user whose MFA is to be removed.

Type: `string`

Required: Yes

## Body

The body is a JSON structure with the following properties.

### mfaType

Type of MFA to remove. Must match the existing MFA type set on the user.

Type: `string`

Valid Values:

* `google-auth`
* `mobile-otp`

Required: Yes

## Returns

A [User](/data-types/user-object) object.

## Sample Request

{% tabs %}
{% tab title="HTTP" %}

```http
PUT /api/Users/u-00000001/RemoveMfa HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json

{
    "mfaType": "google-auth"
}
```

{% endtab %}

{% tab title="Bash" %}

```bash
curl -X PUT "https://api.skeddly.com/api/Users/u-00000001/RemoveMfa" \
  -H "Authorization: AccessKey <api key>" \
  -d mfaType="google-auth"
```

{% endtab %}
{% endtabs %}

## Sample Response

```javascript
{
    "emailAddress": "user@example.com",
    "lastAccessDate": "2016-06-09T11:00:00Z",
    "mfaType": "none",
    "status": "disabled",
    "userId": "u-00000001",
    "username": "user1"
}
```


# Action Object

## Description

Represents an action.

## Properties

### actionId

ID of the action.

Type: `string`

### actionType

Type ID of the action.

Type: `string`

### actionVersionId

Version ID of the action.

Type: `string`

### comments

User notes for the action.

Type: `string`

### displayData

General purpose display data. This will only be populated when requested.

Type: `object`

### lastExection

Action execution data for the last execution of this action. This will only be populated when requested.

Type: [ActionExecution](/data-types/actionexecution-object) object.

### isCurrentVersion

True if the action version is the latest.

Type: `boolean`

### isEnabled

True if the action is enabled to execute. False otherwise.

Type: `boolean`

### lastModifiedBy

ID of the user whom last modified the action.

Type: `string`

### lastModifiedDate

Date, in ISO 8601 format, at which the action was last modified.

Type: `string`

### managedInstanceId

ID of the Managed Instance to which this action belongs.

Type: `string`

### name

Name of the action.

Type: `string`

### nextExecutionDate

Date, in ISO 8601 format, at which the action will next execute.

Type: `string`

### parameters

Additional action parameters specific to the action type. This will only be populated when requested.

Type: [ActionParameters](/data-types/actionparameters-object) object.

### projectId

ID of the project in which the action resides.

Type: `string`

### runningCount

Number of currently running executions of this action. This will only be populated when requested.

Type: `integer`

### schedule

Schedule for the action.

Type: [ActionSchedule](/data-types/actionschedule-object) object

### snsEndpoint

SNS endpoint to trigger the action.

Type: `string`

### tags

Tags for the action.

Type: array of `string`

## Sample JSON

```javascript
{
    "actionId": "a-00000001",
    "actionType": "amazon-start-ec2-instances",
    "actionVersionId": "av-00000001",
    "comments": "Comments about this action",
    "isCurrentVersion": true,
    "isEnabled": true,
    "lastModifiedBy": "u-00000001",
    "lastModifiedDate": "2016-06-09T12:21:00Z",
    "managedInstanceId": "mi-00000001",
    "name": "Start My Instances",
    "nextExecutionDate": "2016-06-10T12:23:00Z",
    "projectId": "proj-00000001",
    "schedule": {
        "scheduleType": "daily",
        "startDate": "2016-06-10",
        "timeOfDay": "12:23:00",
        "timeZoneId": "Eastern Standard Time",
        "parameters": {
            "days": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday"
            ]
        }
    },
    "tags": [
        "cost-reduction"
    ]
}
```


# ActionExecution Object

## Description

Represents a single execution of an action.

## Properties

### actionExecutionId

ID of the action execution

Type: `string`

### actionId

ID of the action that was executed.

Type: `string`

### actionName

Name of the action.

Type: `string`

### actionType

Type ID of the action.

Type: `string`

### actionVersionId

Version ID of the action that was executed.

Type: `string`

### credentialId

ID of the credential.

Type: `string`

### endDate

Date, in ISO8601 format, when the action finished. Will not be present if the status is not "complete".

Type: `string`

### managedInstanceId

ID of the Managed Instance in which the action belongs. Will not be present if the action is not part of a Managed Instance.

Type: `string`

### result

Result of the action execution. Will not be present if the status is not "complete".

Type: [ActionExecutionResult](/data-types/actionexecutionresult-object) object

### startDate

Date, in ISO8601 format, when the action started.

Type: `string`

### status

Status of the execution.

Type: `string`

Valid Values:

* `running`
* `complete`
* `cancelling`
* `cancelled`.

### timeZoneId

ID of the time zone for the action.

Type: `string`

### trigger

Trigger which started the action.

Type: [ActionExecutionTrigger](/data-types/actionexecutiontrigger-object) object.

## Sample JSON

```javascript
{
    "actionExecutionId": "ae-00000001",
    "actionId": "a-00000001",
    "actionName": "Start My Instances",
    "actionType": "amazon-start-ec2-instance",
    "actionVersionId": "av-00000001",
    "credentialId": "cred-00000001",
    "endDate": "2016-06-01T12:03:00Z",
    "managedInstanceId": "mi-00000001",
    "result": {
        "code": 0,
        "text": "Execution succeeded"
    },
    "startDate": "2016-06-01T12:00:00Z",
    "status": "complete",
    "timeZoneId": "UTC",
    "trigger": {
        "triggerType": "schedule"
    }
}
```


# ActionExecutionResult Object

## Description

Specifies the final result of an action execution.

## Properties

### code

Result code.

Type: `integer`

### text

Resulting text message.

Type: `string`

## Sample JSON

```javascript
{
    "code": 0,
    "text": "Execution succeeded"
}
```


# ActionExecutionTrigger Object

## Description

Specifies the trigger for an action execution.

## Properties

### triggerType

Type of trigger.

Type: `string`

Valid Values:

* `schedule`
* `user`
* `sns`

### userId

User that triggered the action execution. Will only be present when `triggerType` is `user`.

Type: `string`

## Sample JSON

```javascript
{
    "triggerType": "user",
    "userId": "u-00000001"
}
```


# ActionExclusion Object

## Description

Represents an action exclusion.

## Properties

### actionExclusionId

ID of the action exclusion.

Type: `string`

### createdDate

Date, in ISO8601 format, when the action exclusion was created.

Type: `string`

### expiryDate

Date, in ISO8601 format, when the action exclusion expires.

Type: `string`

### isEnabled

`true` if the exclusion is enabled, otherwise `false`.

Type: `boolean`

### lastModifiedBy

User ID of the user that last modified the exclusion.

Type: `string`

### lastModifiedDate

Date, in ISO8601 format, when the action exclusion was last modified.

Type: `string`

### name

Name of the action exclusion.

Type: `string`

### processes

List of processes that should be excluded.

Type: Array of `string`

Valid Values:

* `start-resource`
* `stop-resource`

### projectId

ID of the project.

Type: `string`

### resourceType

Type of resource that the action exclusion applies.

Type: `string`

Valid Values:

* `amazon-ec2-instance`
* `amazon-rds-instance`

### resourceIdentificationMethod

Method in which resources will be selected for inclusion in the action exclusion.

Type: `string`

Valid Values:

* `all`
* `by-resource-id`
* `by-resource-tag`

### resourceIds

List of resource identifiers that will be matched. Required when `resourceIdentificationMethod` is `by-resource-id`.

Type: Array of `string`

### resourceTagComparison

Comparison to use when identifying resources by resource tag. Required when `resourceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

### startDate

Date, in ISO8601 format, when the action exclusion starts.

Type: `string`

### status

Status of the exclusion.

Type: `string`

Valid Values:

* `active`
* `deleted`
* `disabled`
* `expired`

### timeZoneId

ID of the time zone for the exclusion.

Type: `string`

## Sample JSON

```javascript
{
    "actionExclusionId": "excl-00000001",
    "projectId": "proj-00000001",
    
    "name": "My Exclusion",
    "status": "active",
    "isEnabled": true,
    
    "createdDate": "2020-05-12T11:36:00Z",
    "lastModifiedDate": "2020-05-12T11:36:00Z",
    "lastModifiedBy": "u-00000001",
    
    "startDate": "2020-05-15T00:00:00Z",
    "expiryDate": "2020-05-19T00:00:00Z",
    "timeZoneId": "Eastern Standard Time",
    
    "processes": [
        "start-resource",
        "stop-resource"
    ],
    
    "resourceType": "amazon-ec2-instance",
    
    "resourceIdentificationMethod": "by-resource-id",
    "resourceIds": [
        "i-12345678"
    ]
}
```


# ActionParameters Object

## Description

The `ActionParameters` object is the base type for all action parameters.

When creating, modifying, or retrieving an action, the `parameters` property will be an object type derived from `ActionParameters`. Each action type has it's own specific derived type.

See [Action Types](/resources/actions/action-types) for the complete list of action types, action type codes, and the corresponding `ActionParameters` object to use.


# AmazonAddSecurityGroupRuleParameters Object

## Description

Parameters for the Amazon Add Security Group Rule action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### description

A description to add to the new rule.

Type: `string`

Required: No

### direction

Direction for the rule.

Type: `string`

Valid Values:

* `inbound`
* `outbound`

Required: Yes

### fromPort

Starting number of the port range (inclusive) to use for the rule.

Type: `integer`

Valid Values: 1 to 65536

Required: Yes

### protocol

Protocol for the rule.

Type: `string`

Valid Values:

* `tcp`
* `udp`
* `icmp`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### registerMultipleDnsEntries

Indicates whether to register all resolved DNS entries or just a single one (randomly). Required if `sourceType` is `domain-name`.

Type: `string`

Valid Values:

* `all`
* `single-random`

Required: Conditional

### revokeOldRules

Indicates whether old rules will be removed from the security group before the new rule is added.

Type: `string`

Valid Values:

* `none`
* `all`
* `all-same-direction`

Required: No

Default: `none`

### revokeTimeInSeconds

Time, in seconds, after which the security group rule will be removed.

Type: `integer`

Valid Values: 1 to 86400

Required: No

### securityGroup

Security group to which the rule will be added.

Type: `string`

Required: Yes

### source

Source to use for the new rule.

Type: `string`

Required: Yes

### sourceType

Type of source for the rule.

Type: `string`

Valid Values:

* `cidr`
* `security-group`
* `domain-name`

Required: Yes

### toPort

Ending number of the port range (inclusive) to use for the rule. Must be greater than or equal to `fromPort`.

Type: `integer`

Valid Values: 1 to 65536

Required: Yes

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "direction": "inbound",
    "protocol": "tcp",
    "fromPort": 22,
    "toPort": 22,
    "securityGroup": "sg-12345678",
    "sourceType": "cidr",
    "source": "10.11.12.13/32",
    "registerMultipleDnsEntries": "single-random",
    "revokeOldRules": "all-same-direction"
}
```


# AmazonApplyS3BucketPolicyParameters Object

## Description

Parameters for the Amazon Apply S3 Bucket Policy action.

## Properties

### applyMethod

Method with which to apply the policy to the bucket.

Type: `string`

Valid Values:

* `always-overwrite`
* `apply-if-not-set`

Required: Yes

### bucketIdentificationMethod

Method of identifying the S3 bucket.

Type: `string`

Valid Values:

* `all-buckets`
* `by-bucket-name`
* `by-resource-tag`

Required: Yes

### bucketNameComparison

Comparison to use when identifying buckets by name. Required when `bucketIdentificationMethod` is `by-bucket-name`.

Type: [BucketNameComparison](/data-types/bucketnamecomparison-object) object.

Required: Conditional

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### customPolicy

Policy document text to apply to the bucket. Required when `policyType` is `custom`.

Type: `string`

Required: Conditional

### isTest

Indicates whether Test Mode should be applied to the object.

Type: `boolean`

Required: Yes

### policyType

Type of policy to apply on the bucket.

Type: `string`

Valid Values:

* `custom`
* `enforce-aes256-encryption`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### resourceTagComparison

Comparison to use when identifying buckets by resource tag. Required when `bucketIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

Required: Conditional

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "bucketIdentificationMethod": "by-bucket-name",
    "bucketNameComparison": {
        "compareType": "starts-with",
        "bucketName": "prod-"
    },
    "applyMethod": "always-overwrite",
    "policyType": "enforce-aes256-encryption",
    "isTest": false
}
```


# AmazonAssociateElasticIpParameters Object

## Description

Parameters for the Amazon Associate Elastic IP Address action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### elasticIpAddress

Elastic IP address to assign to the EC2 instance.

Type: `string`

Required: Yes

### instanceId

Instance ID of the EC2 instance to which assign the Elastic IP address. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: `string`

Required: Conditional

### instanceName

Value of the `Name` tag on the EC2 instance to which assign the Elastic IP address. Required when `instanceIdentificationMethod` is `by-instance-name-tag`. Only one such EC2 instance should exist.

Type: `string`

Required: Conditional

### instanceIdentificationMethod

Method of identifying the EC2 instance.

Type: `string`

Valid Values:

* `by-instance-id`
* `by-instance-name-tag`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "instanceId": "i-12345678",
    "elasticIpAddress": "1.2.3.4"
}
```


# AmazonAttachIamRoleToEc2InstancesParameters Object

## Description

Parameters for the Amazon Attach IAM Role To EC2 Instances action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### iamRoleName

IAM role to assign to the EC2 instances.

Type: `string`

Required: Yes

### instanceIds

Instance IDs of the EC2 instances to which assign the IAM role. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: Array of `string`

Required: Conditional

### instanceNameComparison

Comparison to use when identifying EC2 instances by `Name` tag. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: [InstanceNameComparison](/data-types/instancenamecomparison-object-1) object.

Required: Conditional

### instanceIdentificationMethod

Method of identifying the EC2 instances.

Type: `string`

Valid Values:

* `all-instances`
* `by-instance-id`
* `by-instance-name-tag`
* `by-resource-tag`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### resourceTagComparison

Comparison to use when identifying instances by resource tag. Required when `instanceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

Required: Conditional

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "instanceIds": [
        "i-11111111",
        "i-22222222"
    ],
    "iamRoleName": "MyRole"
}
```


# AmazonBackupEc2InstanceParameters Object

## Description

Parameters for the Amazon Backup EC2 Instance action.

## Properties

### consistencyMethod

Consistency method to use when creating the EBS snapshots.

Type: `string`

Valid Values:

* `none`
* `stop-instance`
* `vss-with-none-fallback`
* `vss-with-stop-instance-fallback`

Default: `none`

Required: No

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### deregisterFromLoadBalancers

Indicates whether to deregister from load balancers when stopping the EC2 instance. Required when `consistencyMethod` is `stop-instance`.

Type: `string`

Valid Values:

* `none`
* `all-load-balancers`

Required: Conditional

### description

Description to assign to the EBS snapshots that are created.

Type: `string`

Required: No

### instanceId

Instance ID of the EC2 instance to backup. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: `string`

Required: Conditional

### instanceName

Value of the `Name` tag on the EC2 instance to backup. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: `string`

Required: Conditional

### instanceIdentificationMethod

Method of identifying the EC2 instance.

Type: `string`

Valid Values:

* `by-instance-id`
* `by-instance-name-tag`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### snapshotName

Value to assign to the `Name` tag of the EBS snapshots that are created.

Type: `string`

Required: No

### tags

Resource tags to add to the EBS snapshots.

Type: Array of [Tag](/data-types/tag-object) object.

Required: No

### targetCredentialId

Credential ID of the AWS credentials to copy the the resulting EBS snapshots. Eg. `cred-12345678`. When setting this field, also set the `targetRegionName` field.

Type: `string`

Required: No

### targetRegionName

Name of a secondary region to copy the resulting EBS snapshots. Must be a valid region. Eg. `us-east-1`

Type: `string`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "instanceId": "i-12345678",

    "consistencyMethod": "stop-instance",
    "deregisterFromLoadBalancers": "none",

    "snapshotName": "$(INSTANCEID)-$(DEVICE)-$(DATE)",
    "description": "Created by Skeddly for $(INSTANCEID) ($(INSTANCENAME))",
    "tags": [
        {
            "key": "skeddly:instance-id",
            "value": "$(INSTANCEID)"
        },
        {
            "key": "skeddly:volume-id",
            "value": "$(VOLUMEID)"
        },
        {
            "key": "skeddly:device",
            "value": "$(DEVICE)"
        }
    ]
}
```


# AmazonBackupEc2InstancesParameters Object

## Description

Parameters for the Amazon Backup EC2 Instances action.

## Properties

### consistencyMethod

Consistency method to use when creating the EBS snapshots.

Type: `string`

Valid Values:

* `none`
* `stop-instance`
* `vss-with-none-fallback`
* `vss-with-stop-instance-fallback`

Required: No

Default: `none`

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### deregisterFromLoadBalancers

Indicates whether to deregister from load balancers when stopping the EC2 instance.

Type: `string`

Valid Values:

* `none`
* `all-load-balancers`

Required: No

Default: `none`

### description

Description to assign to the EBS snapshots that are created.

Type: `string`

Required: No

### InstanceIds

Instance IDs of the EC2 instances to backup.

Type: Array of `string`

Required: No

### instanceNameComparison

*Deprecated*

Comparison to use when identifying EC2 instances by `Name` tag. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: [InstanceNameComparison](/data-types/instancenamecomparison-object-1) object.

Required: Conditional

### instanceIdentificationMethod

*Deprecated*

Method of identifying the EC2 instance.

Type: `string`

Valid Values:

* `all-instances`
* `by-instance-id`
* `by-instance-name-tag`
* `by-resource-tag`

Required: No

### regionNames

Regions to use with the action. Omit (or specify `null`) to include "all regions".

Type: Array of `string`

Required: No

### resourceTagComparison

*Deprecated*

Comparison to use when identifying instances by resource tag. Required when `instanceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

Required: Conditional

### resourceTagComparisons

List of resource tag comparisons to use when matching EC2 instances.

Type: List of [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) objects.

Required: No

### rollingInstanceStops

Settings to use when performing rolling instance stops.

Type: [RollingInstanceStops](/data-types/rollinginstancestops-object) object.

Required: No

### snapshotName

Value to assign to the `Name` tag of the EBS snapshots that are created.

Type: `string`

Required: No

### tags

Resource tags to add to the EBS snapshots.

Type: Array of [Tag](/data-types/tag-object) object.

Required: No

### targetCredentialId

Credential ID of the AWS credentials to copy the the resulting EBS snapshots. Eg. `cred-12345678`. When setting this field, also set the `targetRegionName` field.

Type: `string`

Required: No

### targetRegionName

Name of a secondary region to copy the resulting EBS snapshots. Must be a valid region. Eg. `us-east-1`

Type: `string`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1",
        "us-east-2"
    ],
    
    "resourceTagComparisons": [
        {
            "tagName": "Name",
            "compareType": "starts-with",
            "tagValue": "dev-"
        }
    ],

    "consistencyMethod": "stop-instance",
    "deregisterFromLoadBalancers": "none",

    "snapshotName": "$(INSTANCEID)-$(DEVICE)-$(DATE)",
    "description": "Created by Skeddly for $(INSTANCEID) ($(INSTANCENAME))",
    "tags": [
        {
            "key": "skeddly:instance-id",
            "value": "$(INSTANCEID)"
        },
        {
            "key": "skeddly:volume-id",
            "value": "$(VOLUMEID)"
        },
        {
            "key": "skeddly:device",
            "value": "$(DEVICE)"
        }
    ]
}
```


# AmazonBackupMySQLServerParameters Object

## Description

Parameters for the Amazon Backup MySQL Server action.

## Properties

### allDatabases

Specifies the options when backing up all databases. Required when `databases` is `all-databases`.

Type: [AllDatabases](/data-types/alldatabases-object) object

Required: Conditional

### amazonS3Target

Specifies the option when placing backups into Amazon S3. Required when `targetType` is `amazon-s3`.

Type: [AmazonS3Target](/data-types/amazons3target-object) object

Required: Conditional

### availabilityZone

Availability zone in which to launch the helper EC2 instance.

Type: `string`

Required: No

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### databaseEndpoint

Endpoint information to connect to the server. Required when `endpointMethod` is `specify-endpoint`.

Type: [DatabaseEndpoint](/data-types/databaseendpoint-object) object

Required: Conditional

### databases

Indicates the databases to backup.

Type: `string`

Valid Values:

* `all-databases`
* `specific-databases`

Required: Yes

### endpointMethod

Method to use to retrieve connection information to connect to the server.

Type: `string`

Valid Values:

* `specify-endpoint`

Required: Yes

### engineVersion

Version of the backup engine to use. Unless otherwise instructed, use `version-2`.

Type: `string`

Valid Values:

* `version-1`
* `version-2`

Required: Yes

### extraCommandLineArguments

Extra command line arguments to add to the `mysqldump` command.

Type: `string`

Required: No

### instanceType

Instance type to use for the helper EC2 instance.

Type: `string`

Required: Yes

### isOmitDatabasesFlag

Indicates whether to omit the `--databases` flag from the `mysqldump` command line.

Type: `boolean`

Required: Yes

### privateIpAddress

Private IP address to assign to the helper EC2 instance.

Type: `string`

Required: No

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### securityGroup

Security group to attach to the helper EC2 instance. The security group should have permissions to connect to establish a connection with your MySQL server.

Type: `string`

Required: Yes

### specificDatabases

Specifies the specific database options to backup. Required when `databases` is `specific-databases`.

Type: [SpecificDatabases](/data-types/specificdatabases-object) object

Required: Conditional

### spotInstanceOptions

Use this field to specify options to use a spot instance for your helper EC2 instance.

Type: [SpotInstanceOptions](/data-types/spotinstanceoptions-object) object

Required: No

### subnetId

VPC subnet in which to launch the helper EC2 instance.

Type: `string`

Required: No

### targetType

Type of target to place the backups.

Type: `string`

Valid Values:

* `amazon-s3`

Required: Yes

### volumeSize

The default EBS volume size is 8 GB. If you require more, specify a larger EBS volume size.

Type: `integer`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],

    "engineVersion": "version-2",

    "instanceType": "t2.medium",
    "subnetId": "subnet-12345678",
    "securityGroup": "sg-12345678",
    "volumeSize": 30,

    "databases": "all-databases",
    "allDatabases": {
        "isSeparateDatabases": true
    },

    "endpointMethod": "specify-endpoint",
    "databaseEndpoint": {
        "endpoint": "mysql.example.com",
        "port": 3306,
        "username": "backup-user",
        "password": "pass123!",
    },

    "extraCommandLineArguments": "--single-transaction",
    "isOmitDatabasesFlag": false,

    "targetType": "amazon-s3",
    "amazonS3Target": {
        "bucketName": "my-backups",
        "objectKey": "backups/$(DATE)/$(DATABASE).sql.gz",
        "encryptionType": "aes256"
    }
}
```


# AmazonBackupRoute53HostedZoneParameters Object

## Description

Parameters for the Amazon Backup Route 53 Hosted Zone action.

## Properties

### bucketName

Name of the S3 bucket to which the hosted zone will be backed up.

Type: `string`

Required: Yes

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### exportFormat

Format to use when backing up the hosted zone.

Type: `string`

Valid Values:

* `bind`
* `json`
* `xml`

Required: Yes

### hostedZoneName

Name of the hosted zone to backup. For example, "skeddly.com".

Type: `string`

Required: Yes

### objectKey

Name of the S3 object key where the hosted zone will be backed up. This is effectively the filename.

Type: `string`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "hostedZoneName": "example.com",
    "bucketName": "my-route53-backsup",
    "objectKey": "example.com/$(DATE).json",
    "exportFormat": "json"
}
```


# AmazonBackupRoute53HostedZonesParameters Object

## Description

Parameters for the Amazon Backup Route 53 Hosted Zones action.

## Properties

### bucketName

Name of the S3 bucket to which the hosted zone will be backed up.

Type: `string`

Required: Yes

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### exportFormat

Format to use when backing up the hosted zone.

Type: `string`

Valid Values:

* `bind`
* `json`
* `xml`

Required: Yes

### hostedZoneIdentificationMethod

Method used to identify hosted zones to backup.

Type: `string`

Valid Values:

* `all-hosted-zones`
* `by-hosted-zone-name`

Required: Yes

### hostedZoneNames

Names of the hosted zones to backup. For example, "skeddly.com". Required when `hostedZoneIdentificationMethod` is `by-hosted-zone-name`.

Type: Array of `string`

Required: Yes

### objectKey

Name of the S3 object key where the hosted zone will be backed up. This is effectively the filename.

Type: `string`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "hostedZoneIdentificationMethod": "by-hosted-zone-name",
    "hostedZoneNames": [
        "example1.com",
        "example2.com"
    ],
    "bucketName": "my-route53-backsup",
    "objectKey": "example.com/$(DATE).json",
    "exportFormat": "json"
}
```


# AmazonChangeDynamoDbTablesParameters Object

## Description

Parameters for the Amazon Change DynamoDB Tables action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### readCapacity

New read capacity value to apply to the tables.

Type: `integer`

Required: No

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### revertTimeInSeconds

Time (in seconds) to revert the tables to their original values.

Type: `integer`

Required: No

### tableIdentificationMethod

Method used to select tables to be modified.

Type: `string`

Valid Values:

* `all-tables`
* `by-table-name`

Required: Yes

### tableNameComparison

Comparison to use when comparing by table name. Required when `tableIdentificationMethod` is `by-table-name`.

Type: [TableNameComparison](/data-types/tablenamecomparison-object) object

Required: Conditional

### writeCapacity

New write capacity value to apply to the tables.

Type: `integer`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],

    "tableIdentificationMethod": "by-table-name",
    "tableNameComparison": {
        "compareType": "starts-with",
        "tableName": "prod-"
    },

    "readCapacity": 10,
    "writeCapacity": 3,

    "revertTimeInSeconds": 43200
}
```


# AmazonChangeEbsVolumesParameters Object

## Description

Parameters for the Amazon Change EBS Volumes action.

## Properties

### consistencyMethod

Consistency method used when changing the EBS volumes.

Type: `string`

Valid Values:

* `none`
* `stop-instance`

Required: Yes

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### deleteOnTerminate

Parameters to use when changing the "delete on terminate" value of EBS volumes.

Type: [ChangeDeleteOnTerminate](/data-types/changedeleteonterminate-object) object

Required: No

### deviceName

Name of the device for EBS volumes that will be changed.

Type: `string`

Required: No

### encryption

Parameters to use when modifying the encryption of the EBS volumes.

Type: [ChangeEbsVolumeEncryption](/data-types/changeebsvolumeencryption-object) object

### instanceIds

Instance IDs of the EC2 instances on which the EBS volumes to change are attached. Required when `volumeIdentificationMethod` is `by-instance-id`.

Type: Array of `string`

Required: Conditional

### isDeleteOldVolumes

Indicates whether to delete the original volume after modifications have occurred.

Type: `boolean`

Required: Yes

### isDeleteSnapshots

Indicates whether to delete the intermediate snapshots after modifications have occurred.

Type: `boolean`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### resourceTagComparison

Comparison to use when identifying EBS volumes or EC2 instances by resource tag. Required when `instanceIdentificationMethod` is `by-resource-tag` or `attached-to-instances-by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

Required: Conditional

### size

Parameters to use when resizing the EBS volumes.

Type: [ChangeEbsVolumeSize](/data-types/changeebsvolumesize-object) object

Required: No

### volumeIdentificationMethod

Method used to identify volumes to be modified.

Type: `string`

Valid Values:

* `all-volumes`
* `by-volume-id`
* `by-resource-tag`
* `attached-to-all-instances`
* `attached-to-instances-by-instance-id`
* `attached-to-instances-by-resource-tag`

Required: Yes

### volumeIds

Volume IDs of the EBS volumes to change. Required when `volumeIdentificationMethod` is `by-volume-id`.

Type: Array of `string`

Required: Conditional

### volumeType

Parameters to use when changing the type of EBS volumes.

Type: [ChangeEbsVolumeType](/data-types/changeebsvolumetype-object) object

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],

    "volumeIdentificationMethod": "attached-to-instances-by-resource-tag",
    "resourceTagComparison": {
        "tagName": "change-my-volumes",
        "compareType": "equals",
        "tagValue": "yes"
    },

    "consistencyMethod": "stop-instance",

    "size": {
        "sizeType": "gb-to-add",
        "sizeValue": 100
    },
    "volumeType": {
        "volumeType": "ssd-gp3"
    },
    "encryption": {
        "isEncrypt": true
    },

    "isDeleteOldVolumes": false,
    "isDeleteSnapshots": true
}
```


# AmazonChangeEc2InstanceTypeParameters Object

## Description

Parameters for the Amazon Change EC2 Instance Type action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### deregisterFromLoadBalancers

Indicates whether to deregister from load balancers when stopping the EC2 instance.

Type: `string`

Valid Values:

* `none`
* `all-load-balancers`

Required: Yes

### instanceId

Instance ID of the EC2 instance which will be changed. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: `string`

Required: Conditional

### instanceName

Value of the `Name` tag of the EC2 instance which will be changed. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: `string`

Required: Conditional

### instanceIdentificationMethod

Method of identifying the EC2 instances.

Type: `string`

Valid Values:

* `by-instance-id`
* `by-instance-name-tag`

Required: Yes

### instanceType

New instance type for the EC2 instances.

Type: `string`

Required: No

### isEbsOptimized

New flag indicating whether the EC2 instances are EBS-optimized or not.

Type: `boolean`

Required: No

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### revertTimeInSeconds

Time (in seconds) after which the EC2 instance will be reverted to its original settings.

Type: `integer`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "instanceId": "i-11111111",

    "instanceType": "t2.small",
    "isEbsOptimized": false,

    "revertTimeInSeconds": 43200
}
```


# AmazonChangeEc2InstancesParameters Object

## Description

Parameters for the Amazon Change EC2 Instances action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### deregisterFromLoadBalancers

Indicates whether to deregister from load balancers when stopping the EC2 instance.

Type: `string`

Valid Values:

* `none`
* `all-load-balancers`

Required: Yes

### instanceIds

Instance IDs of the EC2 instances which will be changed. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: Array of `string`

Required: Conditional

### instanceNameComparison

Comparison to use when identifying EC2 instances by `Name` tag. Required when `instanceIdentificationMethod` is `by-instance-name-tag`.

Type: [InstanceNameComparison](/data-types/instancenamecomparison-object-1) object.

Required: Conditional

### instanceIdentificationMethod

Method of identifying the EC2 instances.

Type: `string`

Valid Values:

* `all-instances`
* `by-instance-id`
* `by-instance-name-tag`
* `by-resource-tag`

Required: Yes

### instanceType

New instance type for the EC2 instances.

Type: `string`

Required: No

### isEbsOptimized

New flag indicating whether the EC2 instances are EBS-optimized or not.

Type: `boolean`

Required: No

### isEnableTerminationProtection

New flag indicating whether the EC2 instances should have termination protection enabled.

Type: `boolean`

Required: No

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### resourceTagComparison

Comparison to use when identifying instances by resource tag. Required when `instanceIdentificationMethod` is `by-resource-tag`.

Type: [ResourceTagComparison](/data-types/resourcetagcomparison-object-1) object.

Required: Conditional

### revertTimeInSeconds

Time (in seconds) after which the EC2 instances will be reverted to their original settings.

Type: `integer`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "instanceIds": [
        "i-11111111",
        "i-22222222"
    ],

    "instanceType": "t2.small",
    "isEbsOptimized": false,

    "revertTimeInSeconds": 43200
}
```


# AmazonChangeRdsInstanceClassParameters Object

## Description

Parameters for the Amazon Change RDS Instance Class action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### dbInstanceId

Instance ID of the RDS instance which will be changed. Required when `instanceIdentificationMethod` is `by-instance-id`.

Type: `string`

Required: Conditional

### dbInstanceClass

New instance class for the RDS instance.

Type: `string`

Required: No

### instanceIdentificationMethod

Method of identifying the RDS instance.

Type: `string`

Valid Values:

* `by-instance-id`

Required: Yes

### regionNames

Regions to use with the action. One and only one region must be specified.

Type: Array of `string`

Required: Yes

### revertTimeInSeconds

Time (in seconds) after which the RDS instance will be reverted to its original settings.

Type: `integer`

Required: No

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    "regionNames": [
        "us-east-1"
    ],
    "instanceIdentificationMethod": "by-instance-id",
    "dbInstanceId": "my-rds-instance",

    "dbInstanceClass": "db.m4.xlarge",

    "revertTimeInSeconds": 43200
}
```


# AmazonCheckRootAccessKeysParameters Object

## Description

Parameters for the Amazon Check Root Access Keys action.

## Properties

### credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of `string`

Required: Yes

### reportFormat

Format of the final report. Required when `targetType` is `email`.

Type: `string`

Valid Values:

* `email`
* `email-html-attachment`
* `email-csv-attachment`

Required: Conditional

### targetEmails

The target email addresses to send the final report.

Type: array of `string`

Required: No

### targetType

Indicates whether a report should be generated with the execution results.

Type: `string`

Valid Values:

* `none`
* `email`

Required: No

Default: `none`

## Sample JSON

```javascript
{
    "credentialIds": [
        "cred-00000001"
    ],
    
    "targetType": "email",
    "targetEmails": [
        "foo@example.com"
    ],
    "ReportFormat": "email"
}
```




---

[Next Page](https://docs.skeddly.com/llms-full.txt/1)

