Update storage component configuration

Content Platform for Cloud Scale Management API Reference

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

You can update the configuration of a storage component, which overwrites the existing settings. Use the method /storage_component/list to verify existing settings or changes. Use the method PATCH /storage_component/update to update specific settings.

HTTP request syntax (URI)

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

Request structure

The request body is:

{
  "id": "uuid",
  "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]",
    "readOnly": {true|false}
  }
}
Parameter Required Type Description
id Yes UUID The ID of the storage component.
storageType No 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 to the back-end system. Default: false.
port No Integer The HTTP port of the back-end system.
bucket Yes String The 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
siteAffiliation Yes UUID For id, the UUID representing the storage component or the user.
accessKey Yes   The access key of the S3 credentials for access to the bucket.
secretKey Yes   The secret key of the S3 credentials for access to the bucket.
useProxy No Boolean If true, a proxy server is defined. If false, a proxy server is not defined. 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. This is 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.
socketTimeout No 32-bit integer The timeout value for reading from a connected socket.
connectionTTL No 64-bit integer The connection time to live (TTL) for a request.
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.
readOnly No Boolean If true, objects can be read and removed but writes aren't allowed. If false, writes are allowed.

Response structure

The response returns the same parameters as the request with one addition. The response body structure is:

[
  {
    "id": "",
    "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": true|false,
      "state": "state"
    }
  }
]

Parameter

Type

Description

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 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/update

JSON request:

{
  "storageType": "AMAZON_S3",
  "storageComponentConfig": {
    "label": "Cloud AWS Bucket",
    "host": "172.19.54.102",
    "https": false,
    "port": 9000,
    "bucket": "testbucket",
    "region": "us-west-2",
    "authType": "V2",
    "siteAffiliation": {
      "id": "3fa85f64-1024-4562-bffc-2c963f66afa6"
    },
    "useProxy": false,
    "proxyHost": ,
    "proxyPort": ,
    "proxyUserName": ,
    "proxyPassword": ,
    "proxyDomain": ,
    "usePathStyleAlways": true,
    "connectionTimeout": ,
    "socketTimeout": ,
    "connectionTTL": ,
    "maxConnections": ,
    "userAgentPrefix": ,
    "socketSendBufferSizeHint": ,
    "socketRecvBufferSizeHint": ,
    "readOnly": 
  }
}

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": false,
      "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": false,
      "state": "ACTIVE"
    }
  }
]