Data Types

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 IAM access key credential. Required when credentialType is amazon-access-key.

Type: AmazonIamAccessKeyParameters object.

Required: Conditional

amazonIamRole

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

Type: AmazonIamRoleParameters object.

Required: Conditional

cloudProviderSubTypeId

Cloud-provider sub-type ID.

Type: string

Cloud-provider sub-type ID.

Type: string

Valid Values:

  • amazon-standard

  • amazon-govcloud-us

  • amazon-china

Required: Yes

credentialType

Type of credential being registered.

Type: string

Required: Yes

Valid Values:

  • amazon-iam-role

  • amazon-access-key

name

Friendly name for the credential.

Type: string

Required: Yes

Returns

A Credential object.

Sample Request

HTTP
Bash
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"
}
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"

Sample Response

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