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.
Parameter | Description |
---|---|
Required | |
email | Your email address. |
storageGroupId | Your storage group's ID. |
uploadAccountId | A name for your upload account. Used as the ID once created. |
accessConfig | Object that associates your upload account to your storage groups and CP codes. Required: cpcodes .
|
Optional | |
keys | The password configurations for your upload account's access methods.
|
uploadAccountType | The upload account's type. Value is either:
|
uploadAccountStatus | Whether your upload account is active. Value is either ACTIVE or INACTIVE. |
enableFileManagerAccess | Whether users of the upload account can manage content from the Akamai Control Center. |
enableHttpApiAccess | Whether users of the upload account can manage content from the NetStorage API. |
enableAspera | Whether your upload account uses Aspera to accelerate file transfer speed. |
isEditable | Whether users can edit the upload account in Akamai Control Center. |
isVisible | Whether users can see the upload account in Akamai Control Center. |
bruteForceAttackConfig | Configures the prevention of brute force attacks over FTP.
|
technicalContactInfo | Contact information for your accounts existing or new technical contacts.
|
ruleSetId | The 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
Updated 3 months ago