Create Cloud Image Mapping

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameCreate Cloud Image Mapping
Description

Creates a new image mapping for the specified cloud region

Allowed Role(s)

WM_USER, WM_ADMIN

MethodPOST
URI

v1/tenants/tenantId/clouds/cloudId/regions/cloudRegionId/images

cloudcenter-cloud-setup/api/v1/tenants/tenantId/clouds/cloudId/regions/cloudRegionId/images

Sample Request
curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/clouds/1/regions/1/images"
curl -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-cloud-setup/api/v1/tenants/1/clouds/1/regions/1/images"
Release
  • Introduced in CloudCenter 4.0
  • Enhanced in CloudCenter 4.2 to include the supportHardwareProvision and the localStorageCount  attributes
  • The supportsCuda and cudaSupport attributes are deprecated in CloudCenter 4.7.2
  • The grantAndRevoke attribute is deprecated in CloudCenter 4.9.0

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • At least one valid entry in the mappings attribute is required for this API call to succeed.
  • The id attribute is required for each cloudInstanceType listed in the mappings array.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

action: create.tenants.tenantId.clouds.cloudId.regions.cloudRegionId.images

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample Request Body

{
    "cloudProviderImageId": "73a55133-749f-4cde-b80e-332781ae9b99",
    "launchUserName": "centos",
    "mappings": [
        {
            "cloudProviderImageIdOverride": "73a55133-749f-4cde-b80e-332781ae9b98",
            "costOverride": 0,
            "cloudInstanceType": {
                "id": "2"
            }
        },
        {
            "costOverride": 0,
            "cloudInstanceType": {
                "id": "6"
            }
        }
    ],
    "grantAndRevoke": false,
    "regionId": "1",
    "imageId": "24"
}

Response

{
    "id": "39",
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/clouds/1/regions/1/images/39",
    "perms": [],
    "regionId": "1",
    "cloudProviderImageId": "73a55133-749f-4cde-b80e-332781ae9b99",
    "launchUserName": "centos",
    "imageId": "24",
    "grantAndRevoke": false,
    "imageCloudAccountId": 0,
    "resources": [],
    "mappings": [
        {
            "id": "710",
            "cloudInstanceType": {
                "id": "6",
                "resource": v1/tenants/1/clouds/1/regions/1/instanceTypes/6,
                "perms": [],
                "name": "m3.small",
                "description": null,
                "type": "bdfbfd3e-c979-430e-b242-8dd3678d7466",
                "regionId": "1",
                "costPerHour": 0.4,
                "memorySize": 4096,
                "numOfCpus": 1,
                "numOfNics": 1,
                "localStorageCount": 1,
                "localStorageSize": 30,
                "supportsCuda": false,
                "supportsSsd": false,
                "supports32Bit": true,
                "supports64Bit": true,
                "supportHardwareProvision":true
            },
            "costOverride": 0,
            "cloudProviderImageIdOverride": null
        },
        {
            "id": "711",
            "cloudInstanceType": {
                "id": "2",
                "resource": v1/tenants/1/clouds/1/regions/1/instanceTypes/711,
                "perms": [],
                "name": "m1.small",
                "description": null,
                "type": "00487266-7ba9-4652-8ad9-f57c78c2b073",
                "regionId": "1",
                "costPerHour": 0.2,
                "memorySize": 2048,
                "numOfCpus": 1,
                "numOfNics": 1,
                "localStorageCount": 1,
                "localStorageSize": 20,
                "supportsCuda": false,
                "supportsSsd": false,
                "supports32Bit": true,
                "supports64Bit": true,
                "supportHardwareProvision":true
            },
            "costOverride": 0,
            "cloudProviderImageIdOverride": "73a55133-749f-4cde-b80e-332781ae9b98"
        }
    ]
}


Request Attributes

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

  • Type: String

Required

cloudId
  • Description: Unique, system-generated identifier for a cloud representation (see View Deployment Environments for additional details)

  • Type: String

Required

cloudRegionId
  • Description: Unique, system-generated identifier for a cloud region
  • Type: String

Required

cloudProviderImageId
  • Description: Unique, system-generated identifier for a cloud provider image
  • Type: String

Required

launchUserName
  • Description: User name associated with an image
  • Type: String
mappings 

At least one cloudInstanceType and its corresponding ID are required for this API request to work.

As this API request example only uses some mappings attributes, click to see all attributes.

grantAndRevoke (Deprecated in CloudCenter 4.9.0)
  • Description: Grants image permissions to permitted users on an as needed basis and revoke this access immediately after the permitted user has launched the image.
    • true =Grant permission (default)
    • false = Revoke permission
  • Type: Boolean
regionId
  • DescriptionUnique, system-generated identifier for the cloud region 

  • Type: String

imageId
  • DescriptionUnique, system-generated identifier for a logically mapped image (see Manage Images for additional context).
  • Type: String

Response Attributes

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String

resource
  • Description: Unique URL to access this resource.
  • Type: String
perms (click for additional details)
name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String
type
  • DescriptionThe type of resource
  • Type: String
regionId
  • DescriptionUnique, system-generated identifier for the cloud region 

  • Type: String

costPerHour
  • Description:  The dollar price per hour to use this service. Only the user who created this service (service owner) can set this value (once) for all users using this service.
  • Type: Float
memorySize
  • DescriptionThe RAM size in MB for this Instance Type. See the Map Images section for the relevant release for additional context.
  • Type: Integer
numOfCpus
  • DescriptionThe number of CPUs for this instance type or cloud Image. This attribute is the same as the minNumberOfCpus attribute.
  • Type: Integer
numOfNics
  • Description: The number of Network Interface Cards (NICs) attached to this instance type or cloud image.

  • Type: Integer
localStorageSize
  • Description: The local storage size in GB
  • Type: Integer
supportsCuda (deprecated)
  • Description: Indicates whether CUDA is supported for this instance type. This attribute is the same as the cudaSupport attribute

  • Type: Boolean
    • true = CUDA is supported for this instance type
    • false = CUDA is not supported for this instance type
supportsSsd
  • Description: Indicates whether SSD is supported for this instance type. This attribute is the same as the ssdSupport attribute.

  • Type: Boolean

    • true = SSD is supported for this instance type
    • false = SSD is not supported for this instance type
supports32Bit
  • Description: Indicates whether 32-bit architecture is supported for this instance type

    • true = 32-bit architecture is supported for this instance type
    • false = 32-bit architecture is not supported for this instance type
  • Type: Boolean
supports64Bit
  • Description: Indicates whether 64-bit architecture is supported for this instance type

    • true = 64-bit architecture is supported for this instance type
    • false = 64-bit architecture is not supported for this instance type
  • Type: Boolean
localStorageCount
  • Description: Enables a user to specify the number of additional instance stores (instance storage) that can attached to the Application VM. AWS use this concept of Instance Storage and CloudCenter enables users to create these additional stores using this attribute:
    • Default = 0
    • Minimum = 1
    • Maximum = 24
  • Type: Integer
supportsHardwareProvision 
  • Description: Identifies if hardware provisioning is supported. See the Provisioning Bare Metal Hardware Servers section for the relevant release for additional context:
    • true = Supports hardware provisioning
    • false = Does not support hardware provisioning
  • Type: Boolean


© 2017-2019 Cisco Systems, Inc. All rights reserved