Scalr Clouds API
The Clouds API from Scalr — 2 operation(s) for clouds.
The Clouds API from Scalr — 2 operation(s) for clouds.
swagger: '2.0'
info:
description: Manage Roles, Images, Environments and etc.
title: Scalr Account Acl Roles Clouds API
version: 1.0.0
basePath: /api/v1beta0/account
produces:
- application/json
tags:
- name: Clouds
paths:
/{envId}/clouds/{cloudPlatform}/cloud-locations/:
parameters:
- description: The ID of the Environment scoping this request.
in: path
name: envId
required: true
type: integer
- description: The Cloud Platform this resource resides in.
enum:
- ec2
- gce
- azure
- cloudstack
- idcf
- openstack
- ocs
- otc
- rackspacenguk
- rackspacengus
- hpcloud
- mirantis
- vio
- cisco
- vmware
in: path
name: cloudPlatform
required: true
type: string
get:
description: The list of the Cloud Locations.
responses:
200:
description: A list of CloudLocation objects.
schema:
$ref: '#/definitions/CloudLocationListResponse'
400:
description: A client-side error was made.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: The request was structurally incorrect, and was not understood by the API.
name: InvalidStructure
- description: The request was understood by the API, but included invalid data.
name: InvalidValue
- description: The request wasn't understood by the API.
name: BadRequest
401:
description: The request was not authenticated.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: The request was not properly authenticated.
name: BadAuthentication
403:
description: Insufficient permissions.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: This request should be made in a different Scope.
name: ScopeViolation
- description: You do not have the necessary permissions to perform this request.
name: PermissionViolation
- description: The maximum memory limit in GB has been reached.
name: MemoryQuotaExceeded
- description: The vCPUs limit has been reached.
name: VcpusQuotaExceeded
- description: The maximum number of the Servers that you can launch or resume has been reached.
name: ServersQuotaExceeded
- description: The maximum number of the Servers that you can launch or resume on current Farm has been reached.
name: ServersPerFarmQuotaExceeded
404:
description: Resource not found.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: This endpoint does not exist.
name: EndpointNotFound
noDoc: true
- description: The object you are trying to access does not exist.
name: ObjectNotFound
409:
description: Conflict with current state.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: These changes aren't possible while this object is in use.
name: ObjectInUse
- description: These changes would violate a policy.
name: PolicyViolation
- description: These changes would violate a unicity constraint.
name: UnicityViolation
- description: Some of the objects being changed are locked and cannot be changed.
name: Locked
- description: This Cloud platform is not enabled.
name: NotEnabledPlatform
- description: The Operating System does not match.
name: OperatingSystemMismatch
- description: Some of the objects or actions being access are deprecated.
name: Deprecated
- description: The action can't be perfomed in the current object's state.
name: UnacceptableState
- description: The object that you are trying to access does not exist on the cloud.
name: ObjectNotFoundOnCloud
- description: Some of these settings cannot be applied, they either conflict with the current state or are invalid.
name: UnacceptableObjectConfiguration
422:
description: This request was well-formed but was rejected due to semantic errors.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: Some of the configuration settings cannot be applied because they conflict with the current state.
name: ConfigurationMismatch
500:
description: A server-side error occurred.
schema:
$ref: '#/definitions/ApiErrorResponse'
501:
description: This feature is not implemented in Scalr.
schema:
$ref: '#/definitions/ApiErrorResponse'
503:
description: The service is currently unavailable.
schema:
$ref: '#/definitions/ApiErrorResponse'
tags:
- Clouds
/{envId}/clouds/{cloudPlatform}/cloud-locations/{cloudLocation}/instance-types/:
parameters:
- description: The ID of the Environment scoping this request.
in: path
name: envId
required: true
type: integer
- description: The Cloud Platform this resource resides in.
enum:
- ec2
- gce
- azure
- cloudstack
- idcf
- openstack
- ocs
- otc
- rackspacenguk
- rackspacengus
- hpcloud
- mirantis
- vio
- cisco
- vmware
in: path
name: cloudPlatform
required: true
type: string
- description: 'Cloud Location, inside a given Cloud Platform, for this resource. May be null if this resource does not have a specific location. Note: if you would like to filter on this property, you **must** also filter on `cloudPlatform`.'
in: path
name: cloudLocation
required: true
type: string
get:
description: The list of all Instance Types available for the specified Cloud Location.
responses:
200:
description: A list of InstanceType objects.
schema:
$ref: '#/definitions/InstanceTypeListResponse'
400:
description: A client-side error was made.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: The request was structurally incorrect, and was not understood by the API.
name: InvalidStructure
- description: The request was understood by the API, but included invalid data.
name: InvalidValue
- description: The request wasn't understood by the API.
name: BadRequest
401:
description: The request was not authenticated.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: The request was not properly authenticated.
name: BadAuthentication
403:
description: Insufficient permissions.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: This request should be made in a different Scope.
name: ScopeViolation
- description: You do not have the necessary permissions to perform this request.
name: PermissionViolation
- description: The maximum memory limit in GB has been reached.
name: MemoryQuotaExceeded
- description: The vCPUs limit has been reached.
name: VcpusQuotaExceeded
- description: The maximum number of the Servers that you can launch or resume has been reached.
name: ServersQuotaExceeded
- description: The maximum number of the Servers that you can launch or resume on current Farm has been reached.
name: ServersPerFarmQuotaExceeded
404:
description: Resource not found.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: This endpoint does not exist.
name: EndpointNotFound
noDoc: true
- description: The object you are trying to access does not exist.
name: ObjectNotFound
409:
description: Conflict with current state.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: These changes aren't possible while this object is in use.
name: ObjectInUse
- description: These changes would violate a policy.
name: PolicyViolation
- description: These changes would violate a unicity constraint.
name: UnicityViolation
- description: Some of the objects being changed are locked and cannot be changed.
name: Locked
- description: This Cloud platform is not enabled.
name: NotEnabledPlatform
- description: The Operating System does not match.
name: OperatingSystemMismatch
- description: Some of the objects or actions being access are deprecated.
name: Deprecated
- description: The action can't be perfomed in the current object's state.
name: UnacceptableState
- description: The object that you are trying to access does not exist on the cloud.
name: ObjectNotFoundOnCloud
- description: Some of these settings cannot be applied, they either conflict with the current state or are invalid.
name: UnacceptableObjectConfiguration
422:
description: This request was well-formed but was rejected due to semantic errors.
schema:
$ref: '#/definitions/ApiErrorResponse'
x-errorCodes:
- description: Some of the configuration settings cannot be applied because they conflict with the current state.
name: ConfigurationMismatch
500:
description: A server-side error occurred.
schema:
$ref: '#/definitions/ApiErrorResponse'
501:
description: This feature is not implemented in Scalr.
schema:
$ref: '#/definitions/ApiErrorResponse'
503:
description: The service is currently unavailable.
schema:
$ref: '#/definitions/ApiErrorResponse'
tags:
- Clouds
definitions:
ApiErrorResponse:
description: Common response for erroneous requests.
properties:
errors:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
meta:
$ref: '#/definitions/ApiMetaContainer'
readOnly: true
warnings:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
x-usedIn:
- /user/{envId}/global-variables/
- /user/{envId}/global-variables/{globalVariableName}/
- /user/{envId}/orchestration-rules/
- /user/{envId}/orchestration-rules/{orchestrationRuleId}/
- /user/{envId}/projects/
- /user/{envId}/projects/{projectId}/
- /user/{envId}/cost-centers/
- /user/{envId}/cost-centers/{costCenterId}/
- /user/{envId}/role-categories/
- /user/{envId}/role-categories/{roleCategoryId}/
- /user/{envId}/roles/
- /user/{envId}/roles/{roleId}/
- /user/{envId}/roles/{roleId}/actions/promote/
- /user/{envId}/roles/{roleId}/actions/clone/
- /user/{envId}/roles/{roleId}/actions/deprecate/
- /user/{envId}/roles/{roleId}/images/
- /user/{envId}/roles/{roleId}/images/{imageId}/
- /user/{envId}/roles/{roleId}/images/{imageId}/actions/replace/
- /user/{envId}/roles/{roleId}/global-variables/
- /user/{envId}/roles/{roleId}/global-variables/{globalVariableName}/
- /user/{envId}/roles/{roleId}/orchestration-rules/
- /user/{envId}/roles/{roleId}/orchestration-rules/{orchestrationRuleId}/
- /user/{envId}/images/
- /user/{envId}/images/{imageId}/
- /user/{envId}/images/{imageId}/actions/copy/
- /user/{envId}/images/{imageId}/actions/replace/
- /user/{envId}/servers/
- /user/{envId}/servers/{serverId}/
- /user/{envId}/servers/{serverId}/actions/suspend/
- /user/{envId}/servers/{serverId}/actions/terminate/
- /user/{envId}/servers/{serverId}/actions/resume/
- /user/{envId}/servers/{serverId}/actions/reboot/
- /user/{envId}/servers/{serverId}/actions/sync/
- /user/{envId}/servers/{serverId}/global-variables/
- /user/{envId}/servers/{serverId}/global-variables/{globalVariableName}/
- /user/{envId}/farms/{farmId}/servers/
- /user/{envId}/farm-roles/{farmRoleId}/servers/
- /user/{envId}/scripts/
- /user/{envId}/scripts/{scriptId}/
- /user/{envId}/scripts/{scriptId}/actions/execute/
- /user/{envId}/scripts/{scriptId}/script-versions/
- /user/{envId}/scripts/{scriptId}/script-versions/{scriptVersionNumber}/
- /user/{envId}/scripts/{scriptId}/script-versions/{scriptVersionNumber}/actions/execute/
- /user/{envId}/script-executions/{scriptExecutionId}/
- /user/{envId}/orchestration-logs/
- /user/{envId}/orchestration-logs/{logEntryId}/
- /user/{envId}/event-logs/
- /user/{envId}/event-logs/{eventLogEntryId}/
- /user/{envId}/webhook-endpoints/
- /user/{envId}/os/
- /user/{envId}/os/{osId}/
- /user/{envId}/events/
- /user/{envId}/events/{eventId}/
- /user/{envId}/events/{eventId}/actions/fire/
- /user/{envId}/farms/
- /user/{envId}/farms/{farmId}/
- /user/{envId}/farms/{farmId}/cloud-services/
- /user/{envId}/farms/{farmId}/cloud-services/{farmCloudServiceLinkId}/
- /user/{envId}/farms/{farmId}/actions/generate-template/
- /user/{envId}/farms/{farmId}/actions/launch/
- /user/{envId}/farms/{farmId}/actions/suspend/
- /user/{envId}/farms/{farmId}/actions/resume/
- /user/{envId}/farms/{farmId}/actions/terminate/
- /user/{envId}/farms/{farmId}/actions/lock/
- /user/{envId}/farms/{farmId}/actions/unlock/
- /user/{envId}/farms/{farmId}/actions/clone/
- /user/{envId}/farms/{farmId}/global-variables/
- /user/{envId}/farms/{farmId}/global-variables/{globalVariableName}/
- /user/{envId}/farms/{farmId}/farm-roles/
- /user/{envId}/farm-roles/{farmRoleId}/
- /user/{envId}/farm-roles/{farmRoleId}/actions/import-server/
- /user/{envId}/farm-roles/{farmRoleId}/actions/generate-template/
- /user/{envId}/farm-roles/{farmRoleId}/actions/clone/
- /user/{envId}/farm-roles/{farmRoleId}/scaling/
- /user/{envId}/farm-roles/{farmRoleId}/scaling/{metricName}/
- /user/{envId}/farm-roles/{farmRoleId}/storage/
- /user/{envId}/farm-roles/{farmRoleId}/storage/{storageConfigurationId}/
- /user/{envId}/scaling-metrics/
- /user/{envId}/scaling-metrics/{metricName}/
- /user/{envId}/farm-roles/{farmRoleId}/global-variables/
- /user/{envId}/farm-roles/{farmRoleId}/global-variables/{globalVariableName}/
- /user/{envId}/farm-roles/{farmRoleId}/orchestration-rules/
- /user/{envId}/farm-roles/{farmRoleId}/orchestration-rules/{orchestrationRuleId}/
- /user/{envId}/clouds/{cloudPlatform}/cloud-locations/
- /user/{envId}/clouds/{cloudPlatform}/cloud-locations/{cloudLocation}/instance-types/
ApiMessage:
properties:
code:
description: A machine-readable representation of the message.
type: string
message:
description: A human-readable representation of the message.
type: string
InstanceTypeCloudFeatures:
description: Cloud specific Instance type configuration.
discriminator: type
properties:
type:
enum:
- AwsInstanceTypeCloudFeatures
type: string
required:
- type
x-concreteTypes:
- $ref: '#/definitions/AwsInstanceTypeCloudFeatures'
InstanceTypeListResponse:
properties:
data:
items:
$ref: '#/definitions/InstanceType'
readOnly: true
type: array
errors:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
meta:
$ref: '#/definitions/ApiMetaContainer'
readOnly: true
pagination:
$ref: '#/definitions/ApiPagination'
readOnly: true
warnings:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
x-derived:
$ref: '#/definitions/InstanceType'
x-usedIn:
- /user/{envId}/clouds/{cloudPlatform}/cloud-locations/{cloudLocation}/instance-types/
ApiMetaContainer:
properties:
sample:
description: Actual properties TBD.
type: string
InstanceType:
properties:
cloudFeatures:
$ref: '#/definitions/InstanceTypeCloudFeatures'
description: Cloud specific parameters related to Instance Type.
readOnly: true
id:
description: Identifier of the InstanceType object.
readOnly: true
type: string
memory:
description: Memory in GB allocated for the Instance.
readOnly: true
type: number
name:
description: The Instance Type Name in the Cloud.
readOnly: true
type: string
storage:
description: Total disks size in GB.
readOnly: true
type: integer
vcpus:
description: Virtual CPUs count.
readOnly: true
type: integer
x-filterable:
- id
- name
- storage
CloudLocation:
properties:
cloudLocation:
description: 'Cloud Location, inside a given Cloud Platform, for this resource. May be null if this resource does not have a specific location. Note: if you would like to filter on this property, you **must** also filter on `cloudPlatform`.'
type: string
cloudPlatform:
description: The Cloud Platform this resource resides in.
enum:
- ec2
- gce
type: string
required:
- cloudPlatform
x-usedIn:
- /user/{envId}/images/{imageId}/actions/copy/
ApiPagination:
properties:
first:
readOnly: true
type: string
last:
readOnly: true
type: string
next:
readOnly: true
type: string
prev:
readOnly: true
type: string
AwsInstanceTypeCloudFeatures:
description: AWS instance type configuration.
properties:
ebsEncryption:
description: Whether current instance type supports EBS encryption.
type: boolean
ebsOptimized:
description: EBS-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O.
type: boolean
enhancedNetworking:
description: Enhanced networking uses single root I/O virtualization (SR-IOV) to provide high-performance networking capabilities on supported instance types.
type: boolean
hvmOnly:
description: Instance type supports only HVM images.
type: boolean
type:
enum:
- AwsInstanceTypeCloudFeatures
type: string
vpcOnly:
description: Instance type can be launched only in VPC.
type: boolean
required:
- type
x-abstractType:
$ref: '#/definitions/InstanceTypeCloudFeatures'
x-discriminator: type
CloudLocationListResponse:
properties:
data:
items:
$ref: '#/definitions/CloudLocation'
readOnly: true
type: array
errors:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
meta:
$ref: '#/definitions/ApiMetaContainer'
readOnly: true
pagination:
$ref: '#/definitions/ApiPagination'
readOnly: true
warnings:
items:
$ref: '#/definitions/ApiMessage'
readOnly: true
type: array
x-derived:
$ref: '#/definitions/CloudLocation'
x-usedIn:
- /user/{envId}/clouds/{cloudPlatform}/cloud-locations/
x-dry-yaml-definitions:
architecture:
enum:
- i386
- x86_64
type: string
cloudLocationProperties:
cloudLocation:
description: 'Cloud Location, inside a given Cloud Platform, for this resource. May be null if this resource does not have a specific location. Note: if you would like to filter on this property, you **must** also filter on `cloudPlatform`.'
type: string
cloudPlatform:
description: The Cloud Platform this resource resides in.
enum:
- ec2
- gce
type: string
cloudstackProvider:
description: Cloud provider that should be specified for CloudStack based clouds.
enum:
- cloudstack
- idcf
type: string
openstackProvider:
description: Cloud provider that should be specified for OpenStack based clouds.
enum:
- openstack
- ocs
- hpcloud
- mirantis
- vio
- cisco
type: string
pathParamsPatterns:
uuid:
maxLength: 36
minLength: 36
pattern: '[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}'
uuidShort:
maxLength: 12
minLength: 12
pattern: '[A-Fa-f0-9]+'
scopeProperty:
enum:
- scalr
- account
- environment
- farm
- farmrole
- role
- server
type: string