IBM Cloud Docs
Mapping container

Mapping container

The SoftLayer_Container_Network_CdnMarketplace_Configuration_Mapping collection contains the attributes that are used by our Mapping APIs. Each of the Mapping APIs returns a collection of this type.

class SoftLayer_Container_Network_CdnMarketplace_Configuration_Mapping:

  • vendorName: The name of a valid IBM Cloud® CDN provider.
  • uniqueId: A 10-digit, system-generated, identifier that is unique to each mapping. Generated when a mapping is created.
  • domain: Primary CDN name. Also referred to as hostname.
  • protocol: Protocol used to set up services. It can be HTTP, HTTPS, or a combination of the two, HTTP_AND_HTTPS.
  • originType: Type of the origin host, currently 'HOST_SERVER' or 'OBJECT_STORAGE'.
  • originHost: Origin server address (either the hostname or the IPv4 address of the origin server), which is the endpoint from which to fetch content, or the name of the Bucket where content is stored. It must be fewer than 511 characters.
  • httpPort: Number of the port used for HTTP protocol. Akamai has certain limitations on port numbers for HTTP and HTTPS ports. See the FAQ for allowed port numbers.
  • httpsPort: Number of the port used for HTTPS protocol. Akamai has certain limitations on port numbers for HTTP and HTTPS ports. See FAQ for allowed port numbers.
  • certificateType: Type of certificate being used by a mapping. Can be WILDCARD_CERT or SHARED_SAN_CERT. Value is 0 for HTTP mappings.
  • cname: Canonical name record that aliases the hostname. It can be provided by the user, or system-generated. If user-provided, it should be less than 64 alphanumeric characters, and it must be unique. If not provided, one is generated when the mapping is created.
  • akamaiCname: Canonical name record that aliases the hostname. It's generated by Akamai, and can provide a shorter DNS lookup time.
  • respectHeaders: A Boolean value that, if set to 'true', causes TTL settings in the origin to override CDN TTL settings.
  • header: Specifies Host header information that is used by the origin server.
  • status: The mapping's status. Status can be CNAME_CONFIGURATION, SSL_CONFIGURATION, RUNNING, STOPPED, DELETED, or ERROR.
  • bucketName: Bucket name for your S3 object storage.
  • fileExtension: File extensions that are allowed to be cached.
  • path: The path to your S3 object storage. Usually found in the object store URL or API section of your service.
  • cacheKeyQueryRule: The following options are available to configure Cache Key behavior:
    • include-all: Include all query arguments Default
    • ignore-all: Ignore all query arguments
    • ignore: space separated query-args: Ignores those specific query arguments. For example, "ignore: query1 query2"
    • include: space separated query-args: Includes those specific query arguments. For example, "include: query1 query2"

Of particular note is the uniqueId, which is generated when a mapping is created and is used as a parameter to subsequent API calls.

For example, this call to listDomainMappingByUniqueid

$cdnMapping = $client->listDomainMappingByUniqueid('750352919747xxx');  

Returns an object similar to this one:

[0] => SoftLayer_Container_Network_CdnMarketplace_Configuration_Mapping Object
        (
            [cacheKeyQueryRule] => include-all
            [certificateType] => NO_CERT
            [cname] => api-testing.cdn.appdomain.cloud.
            [akamaiCname] => wildcard.appdomain.mdc.edgekey.net.
            [domain] => api-testing.cdntesting.net
            [header] => origin.cdntesting.net
            [httpPort] => 80
            [httpsPort] =>
            [originHost] => origin.cdntesting.net
            [originType] => HOST_SERVER
            [path] => /media/
            [performanceConfiguration] => General web delivery
            [protocol] => HTTP
            [respectHeaders] => 0
            [serveStale] => 1
            [status] => RUNNING
            [uniqueId] => 750352919747xxx
            [vendorName] => akamai
        )

Calls to stopDomainMapping and startDomainMapping will return the same Mapping object, with the status being the difference.

[0] => SoftLayer_Container_Network_CdnMarketplace_Configuration_Mapping Object
        (
          ...

            [status] => STOPPED
            [uniqueId] => 750352919747xxx

          ...
        )

[0] => SoftLayer_Container_Network_CdnMarketplace_Configuration_Mapping Object
        (
          ...

            [status] => RUNNING
            [uniqueId] => 750352919747xxx

          ...
        )