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 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 object.

Sample Request

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"
    ]
}

Sample Response

{
    "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"
    ]
}

Last updated