Configure storage component

Content Platform for Cloud Scale Management API Reference

Version
2.5.x
Audience
anonymous
Part Number
MK-HCPCS007-08

You can configure a storage component, which exposes the S3 buckets for storage of data on various storage back-end systems. Buckets must already be created on the storage component before you can configure it. Ensure that the buckets are empty.

HTTP request syntax (URI)

POST https://host_ip:9099/mapi/v1/storage_component/create

Request structure

The request body is:

{
  "storageType": "type",
  "storageComponentConfig": {
    "label": "[label]",
    "host": "url",
    "https": {true|false},
    "port": [nnnnn],
    "bucket": "bucket_name",
    "region": "[region_name]",
    "authType": "[V2|V4]",
    "siteAffiliation": {
      "id": "uuid"
    },
    "accessKey": "key",
    "secretKey": "key",
    "useProxy": [true|false],
    "proxyHost": "[host_name]",
    "proxyPort": [nnnnn],
    "proxyUserName": "[user_name]",
    "proxyPassword": "[password]",
    "proxyDomain": "[domain_name]",
    "usePathStyleAlways": [true|false],
    "connectionTimeout": [ms],
    "socketTimeout": [ms],
    "connectionTTL": [ms],
    "maxConnections": [nnnnnnn],
    "userAgentPrefix": "[prefix]",
    "socketSendBufferSizeHint": [nnnnnnn],
    "socketRecvBufferSizeHint": [nnnnnnn],
    "managementProtocol": [http|https],
    "managementHost": "[host_name]",
    "managementUser": "[user_name]",
    "managementPassword": "[password]",
    "activateNow": [true|false]
  }
}
Parameter Required Type Description
storageType Yes String The type of storage component:
  • AMAZON_S3: An Amazon Web Services S3-compatible node
  • HCP_S3: A Hitachi Content Platform node
  • HCPS_S3: An HCP S Series Node
  • GENERIC_S3: An S3-compatible node
storageComponent​Config Yes List The following storage component configuration values:
label No String The name of the storage component.
host Yes String The URL of the storage component back-end host domain.
https Yes Boolean If true, use an HTTPS connection to the back-end system. If false, use an HTTP connection. Default: false.
port No Integer HTTP port of back-end system.
bucket Yes String Name of the bucket. The bucket must already exist.
region No String The S3 region. Default: us-east-1.
authType No String The AWS Signature Version for authenticating all interactions with Amazon S3:
  • V2
  • V4

Default: V4.

siteAffiliation Yes UUID For id, the UUID representing the storage component or the user.
accessKey Yes   Access key of the S3 credentials for access to the bucket.
secretKey Yes   Secret key of the S3 credentials for access to the bucket.
useProxy No Boolean If true, a proxy server is defined. If false, it is not. If true, then values are required for proxyHost and proxyHost. Default: false.
proxyHost No String The proxy host, if used.
proxyPort No Integer The proxy port number, if used.
proxyUserName No String The proxy domain user name, if used.
proxyPassword No String The proxy domain password, if used.
proxyDomain No String The proxy domain. Not supported.
usePathStyleAlways No Boolean If true, use path-style syntax to send requests to the back-end system. If false, use virtual-hosted style. Default: true.
connectionTimeout No 32-bit integer The amount of time, in milliseconds, that the HTTP connection waits to establish a connection before timing out. Default: 10000 ms (10 sec).
socketTimeout No 32-bit integer The timeout value, in milliseconds, for reading from a connected socket. Default: 5000 ms (5 sec).
connectionTTL No 64-bit integer The connection time to live (TTL) for a request. Default: unlimited (the connection never closes).
maxConnections No 32-bit integer The maximum number of open HTTP connections to a storage component. If not specified, the defaults are:
  • HCPS_S3: 1024
  • HCP_S3: 50
  • AMAZON_S3: 50
  • GENERIC_S3: 50
userAgentPrefix No String The HTTP user agent prefix header, used in requests to a storage component.
socketSendBuffer​Size​Hint No 32-bit integer The size hint, in bytes, for the low-level TCP send buffer. If specified, you must also specify socketRecvBufferSizeHint.
socketRecvBuffer​Size​Hint No 32-bit integer The size hint, in bytes, for the low-level TCP receive buffer. If specified, you must also specify socketSendBufferSizeHint.
managementProtocol Yes (for HCP S Series Node) String Required for an HCP S Series Node storage component; do not provide for other storage component types. The communication protocol for MAPI requests:
  • http
  • https

There is no default; if you use the parameter you must specify a value.

managementHost Yes (for HCP S Series Node) String Required for an HCP S Series Node storage component; do not provide for other storage component types. Type the management system IP address or fully qualified domain name.
managementUser Yes (for HCP S Series Node) String Required for an HCP S Series Node storage component; do not provide for other storage component types. The administrative user name credential. The account must have permissions to execute MAPI methods on the storage component.
managementPassword Yes (for HCP S Series Node) String Required for an HCP S Series Node storage component; do not provide for other storage component types. The password credential. The account must have permissions to execute MAPI methods on the storage component.
activateNow No Boolean If true, activate the storage component immediately. If false, do not activate the storage component. Default: true.

Response structure

The response returns the same parameters as the request with the following additions. The response body structure is:

[
  {
    "id": "uuid",
    "storageType": "",
    "storageComponentConfig": {
      "label": "",
      "host": "",
      "https": ,
      "port": ,
      "bucket": "",
      "region": "",
      "authType": "",
      "siteAffiliation": {
        "id": ""
      },
      "useProxy": ,
      "proxyHost": "",
      "proxyPort": ,
      "proxyUserName": "",
      "proxyPassword": "",
      "proxyDomain": "",
      "usePathStyleAlways": ,
      "connectionTimeout": ,
      "socketTimeout": ,
      "connectionTTL": ,
      "maxConnections": ,
      "userAgentPrefix": "",
      "socketSendBufferSizeHint": ,
      "socketRecvBufferSizeHint": ,
      "managementProtocol": ,
      "managementHost": ,
      "readOnly": ,
      "state": "state"
    }
  }
]

Parameter

Type

Description

id UUID The ID of the storage component.
state Enum The state of the storage component, indicating its availability to serve requests:
  • ACTIVE: The storage component is ready for requests.
  • INACTIVE: The storage component is on an administrative pause.
  • INACCESSIBLE: The storage component is not accessible. This condition can be caused by network, authentication, or certificate errors.
  • UNVERIFIED: The storage component has not been activated or has failed to activate.

Return codes

Status code

HTTP name

Description

200 OK The request was executed successfully.
400 Bad Request The request is missing a valid storage component or parameter.
401 Unauthorized Access was denied because credentials are not valid.
405 Method Not Allowed The specified HTTP method is not allowed for a storage component. Resend using POST.

Example

Request example:

POST https://10.10.24.195:9099/mapi/v1/storage_component/create

JSON request:

{
  "storageType": "AMAZON_S3",
  "storageComponentConfig": {
    "label": "Cloud AWS Bucket",
    "host": "URL of an existing storage component backend",
    "https": true,
    "port": 0,
    "bucket": "string",
    "region": "string",
    "authType": "V2",
    "siteAffiliation": {
      "id": "3fa85f64-1024-4562-b3fc-2c963f66afa6"
    },
    "accessKey": "string",
    "secretKey": "string",
    "useProxy": true,
    "proxyHost": "string",
    "proxyPort": null,
    "proxyUserName": "string",
    "proxyPassword": "string",
    "proxyDomain": "string",
    "usePathStyleAlways": true,
    "connectionTimeout": null,
    "socketTimeout": null,
    "connectionTTL": null,
    "maxConnections": null,
    "userAgentPrefix": "string",
    "socketSendBufferSizeHint": null,
    "socketRecvBufferSizeHint": null,
    "activateNow": true
  }
}

JSON response:

[
  {
    "id": "3fa85f64-1024-4562-b3fc-2c963f66afa6",
    "storageType": "AMAZON_S3",
    "storageComponentConfig": {
      "label": "Cloud AWS Bucket",
      "host": "URL of an existing storage component backend",
      "https": true,
      "port": 0,
      "bucket": "string",
      "region": "string",
      "authType": "V2",
      "siteAffiliation": {
        "id": "3fa85f64-1024-4562-b3fc-2c963f66afa6"
      },
      "useProxy": true,
      "proxyHost": "string",
      "proxyPort": 0,
      "proxyUserName": "string",
      "proxyPassword": "string",
      "proxyDomain": "string",
      "usePathStyleAlways": true,
      "connectionTimeout": 0,
      "socketTimeout": 0,
      "connectionTTL": 0,
      "maxConnections": 50,
      "userAgentPrefix": "string",
      "socketSendBufferSizeHint": 0,
      "socketRecvBufferSizeHint": 0,
      "readOnly": true,
      "state": "ACTIVE"
    }
  }
]