Configuration

Create and configure a storage container for your content.

1. Create a CP code

A CP code is an ID used to get statistical data for reporting and billing. It's also a reference ID for the root directory in any storage group.

  • Each storage group needs at least one CP code.
  • CP codes are are unique to each storage group.

To create a new CP code, pass your contract ID and a name for your CP code as parameters in the new CP code command.

New-NetstorageCPCode -ContractID "C-0N7RAC7" -CPCodeName "MyCPCode"
cpcodeId
--------
 1234567

2. Make a storage group

A storage group is the root location at which you store content. The CP codes you add become root-level directories.

Your contract determines how much you can store and the geographical locations available to you for replication.

To create a storage group, pass all required parameters as a variable or JSON string in the body of the new NetStorage group command.

$Body = @{
  contractId = "C-0N7RAC7"
  storageGroupName = "MyStorageGroup"
  domainPrefix = "my-domain-prefix"
  cpcodes = @(
    @{cpcodeId = 1234567}
    @{cpcodeId = 2345678}
  )
  zones = @(
    @{zoneName = "global"},
    @{"zoneName": "europe"}
  )
}

New-NetstorageGroup -Body $Body
New-NetstorageGroup -Body '{"contractId":"C-0N7RAC7","storageGroupName":"MyStorageGroup","domainPrefix":"my-domain-prefix","cpcodes":[{"cpcodeId":1234567},{"cpcodeId:2345678}],"zones": [{"zoneName": "global"},{"zoneName": "europe"}]}'
contractId          : C-0N7RAC7
storageGroupId      : 987654
storageGroupName    : MyStorageGroup
storageGroupType    : OBJECTSTORE
storageGroupPurpose : NETSTORAGE
domainPrefix        : my-domain-prefix
asperaEnabled       : False
pciEnabled          : False
estimatedUsageGB    : 0
allowEdit           : True
provisionStatus     : PROVISIONED
cpcodes             : {@{cpcodeId=1234567; 
                      downloadSecurity=ALL_EDGE_SERVERS; 
                      useSsl=False; serveFromZip=False; 
                      sendHash=False; quickDelete=False; 
                      numberOfFiles=-1; numberOfBytes=-1; 
                      lastChangesPropagated=False; 
                      queryStringConversion=; 
                      encodingConfig=; dirListing=; 
                      lastModifiedBy=jsmith; 
                      lastModifiedDate=11/8/2023 7:14:38 
                      PM},@{cpcodeId=2345678; 
                      downloadSecurity=ALL_EDGE_SERVERS; 
                      useSsl=False; serveFromZip=False; 
                      sendHash=False; quickDelete=False; 
                      numberOfFiles=-1; numberOfBytes=-1; 
                      lastChangesPropagated=False; 
                      queryStringConversion=; 
                      encodingConfig=; dirListing=; 
                      lastModifiedBy=jsmith; 
                      lastModifiedDate=11/8/2023 7:14:38 
                      PM} }
zones               : {@{zoneName=global; 
                      noCapacityAction=SPILL_OUTSIDE; 
                      allowUpload=YES; allowDownload=YES; 
                      lastModifiedBy=jsmith; 
                      lastModifiedDate=11/8/2023 7:14:38 
                      PM}, @{zoneName=europe; 
                      noCapacityAction=SPILL_OUTSIDE; 
                      allowUpload=YES; allowDownload=YES; 
                      lastModifiedBy=jsmith; 
                      lastModifiedDate=11/8/2023 7:14:38 
                      PM}}
propagationStatus   : @{status=PENDING}
lastModifiedBy      : jsmith
lastModifiedDate    : 11/8/2023 7:14:39 PM
links               : {@{rel=self; href=/storage-services//s
                      torage-groups/987654}, 
                      @{rel=uploadAccounts; href=/storage-se
                      rvices//upload-accounts?storageGroupId
                      =987654}, @{rel=zones; 
                      href=/storage-services//zones}}

3. Prepare an upload account

For each of your storage groups, you need an upload account with which you'll add your content. You can also create and associate an upload account for each of your root directories.

To create an upload account, pass all required parameters as a variable or JSON string in the body of the new NetStorage group command.

ParameterDescription
Required
emailYour email address.
storageGroupIdYour storage group's ID.
uploadAccountIdA name for your upload account. Used as the ID once created.
accessConfigObject that associates your upload account to your storage groups and CP codes. Required: cpcodes.
  • chrootdirectory. The directory limit directory for your storage group.
  • cpcodes. Required cpcodeId An array of your CP codes and their settings.
    • cpcodeId. A CP code ID.
    • subDirectory restrictions. An array with any subdirectory operation limits.
  • hasReadOnlyAccess. Whether the account is read only.
  • loginDirectory. The default directory for your upload account.
Optional
keysThe password configurations for your upload account's access methods.
  • ssh. An array of SSH access keys.
  • ftp. An array of FTP access keys.
  • rsync. An array of Rsync access keys.
  • g2o. An array of G2O access tokens.
uploadAccountTypeThe upload account's type. Value is either:
  • NORMAL. You delete content manually.
  • AGEDELETION. Automatically deletes content based on your storage group's settings.
uploadAccountStatusWhether your upload account is active. Value is either ACTIVE or INACTIVE.
enableFileManagerAccessWhether users of the upload account can manage content from the Akamai Control Center.
enableHttpApiAccessWhether users of the upload account can manage content from the NetStorage API.
enableAsperaWhether your upload account uses Aspera to accelerate file transfer speed.
isEditableWhether users can edit the upload account in Akamai Control Center.
isVisibleWhether users can see the upload account in Akamai Control Center.
bruteForceAttackConfigConfigures the prevention of brute force attacks over FTP.
  • failedLoginThreshold. The number of failed login attempts that when reached trigger lock down of the offending client IP address.
  • lockdownDurationSeconds. The number of seconds to block the offending IP address from FTP access.
technicalContactInfoContact information for your accounts existing or new technical contacts.
  • existingNetStorageTechnicalContract. The pair of existing user accounts designated as technical contacts.
    • primarySfPin. The primary contact's user account.
    • secondarySfPin. The secondary contact's user account.
  • existingTechnicalContact. The pair of existing user accounts designated as NetStorage technical contacts.
    • primarySfPin. The primary contact's user account.
    • secondarySfPin. The secondary contact's user account
  • newTechnicalContact. Contact information object for a new technical contact. Include an email, firstName, lastName, and the phone object containing the areaCode, countryCode, and number for your contact.
ruleSetIdThe access control list's rule set ID.
$Body = @{
  email = jsmith@email.com
  storageGroupId = 987654
  uploadAccountId = "my-upload-account"
  accessConfig = @{
      cpcodes = @(
        @{cpcodeId = 1554741}
      )
    }
  keys = @{
    ssh = @(
      @{key = "ssh-rsa ABCD12345/+zyXw9876.../lmn jsmith@email.com"}
      )
  }
}

New-NetstorageUploadAccount -Body $Body
New-NetstorageUploadAccount -Body '{"email":"jsmith@email.com","storageGroupId":987654,"uploadAccountId":"my-upload-account","accessConfig":[{"cpcodes":[{"cpcodeId":1234567}]}],"keys":{"ssh":["ssh-rsa":"ABCD12345/+zyXw9876.../lmn jsmith@email.com"]}}'
uploadAccountId        : my-upload-account
storageGroupId         : 987654
storageGroupName       : my-storage-group
storageGroupType       : OBJECTSTORE
uploadAccountStatus    : ACTIVE
isEditable             : True
isVisible              : True
ftpEnabled             : False
sshEnabled             : True
rsyncEnabled           : False
asperaEnabled          : False
eventSubEnabled        : False
hasFileManagerAccess   : False
hasHttpApiAccess       : False
hasPendingPropagation  : True
email                  : jsmith@email.com
keys                   : @{ssh=System.Object[]}
accessConfig           : @{hasReadOnlyAccess=False; 
                         cpcodes=System.Object[]}
changeHistory          : {@{changeType=UPLOAD_ACCOUNT; action=ADDED; 
                         propagated=False; 
                         lastModifiedBy=jsmith; 
                         lastModifiedDate=11/15/2023 1:57:02 PM}}
lastModifiedBy         : jsmith
lastModifiedDate       : 11/15/2023 1:57:02 PM
enableZipFileAutoIndex : False