Documentation
¶
Index ¶
- func AbortVaultLock(awsRegion, vaultName string)
- func CompleteVaultLock(awsRegion, vaultName, lockID string)
- func CreateBucket(awsRegion, bucketName string)
- func CreateVault(awsRegion, vaultName string)
- func DeleteArchive(awsRegion, vaultName, ArchiveID string)
- func DeleteBucket(awsRegion, bucketName string)
- func DeleteObjects(awsRegion, bucketName, objectKey string)
- func DeleteVault(awsRegion, vaultName string)
- func DescribeJob(awsRegion, vaultName, jobID string)
- func DescriveVault(awsRegion, vaultName string)
- func GetRetrievalPolicy(awsRegion string)
- func GetVaultAccessPolicy(awsRegion, vaultName string)
- func GetVaultArchive(awsRegion, vaultName, jobID, fileName string)
- func GetVaultLock(awsRegion, vaultName string)
- func GetVautlInventory(awsRegion, vaultName, jobID string)
- func InitArchiveRetrieval(awsRegion, vaultName, jobDescription, archiveID string)
- func InitInventoryRetrieval(awsRegion, vaultName, jobDescription string)
- func InitJobInput(awsRegion, vaultName string)
- func InitiateVaultLock(awsRegion, vaultName, vaultPolicy string)
- func ListBuckets(awsRegion string)
- func ListJobs(awsRegion, vaultName string)
- func ListObjects(awsRegion, bucketName string)
- func ListVault(awsRegion string)
- func SetDataRetrievalPolicy(awsRegion, strategyPolicy string, bytesPerHour int64)
- func SetDataRetrievalPolicyFreeTier(awsRegion string)
- func SetupAWSAuth()
- func UploadArchive(awsRegion, vaultName, fileUpload string)
- func UploadBucket(awsRegion, bucketName, fileUpload string)
- func UserHomeDir() string
- type VaultInventory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortVaultLock ¶
func AbortVaultLock(awsRegion, vaultName string)
AbortVaultLock - This operation aborts the vault locking process if the vault lock is not in the Locked state. If the vault lock is in the Locked state when this operation is requested, the operation returns an AccessDeniedException error. Aborting the vault locking process removes the vault lock policy from the specified vault.
func CompleteVaultLock ¶
func CompleteVaultLock(awsRegion, vaultName, lockID string)
CompleteVaultLock - This operation completes the vault locking process by transitioning the vault lock from the InProgress state to the Locked state, which causes the vault lock policy to become unchangeable.
func CreateVault ¶
func CreateVault(awsRegion, vaultName string)
CreateVault - Create new vault based on name and region
func DeleteArchive ¶
func DeleteArchive(awsRegion, vaultName, ArchiveID string)
DeleteArchive - Delete archive
func DeleteObjects ¶
func DeleteObjects(awsRegion, bucketName, objectKey string)
DeleteObjects - Delete object from s3 bucket
func DeleteVault ¶
func DeleteVault(awsRegion, vaultName string)
DeleteVault - Delete vault based on name and region
func DescribeJob ¶
func DescribeJob(awsRegion, vaultName, jobID string)
DescribeJob - Get information about a previously initiated job, specified by the job ID.
func DescriveVault ¶
func DescriveVault(awsRegion, vaultName string)
DescriveVault - Retrieve information about a vault
func GetRetrievalPolicy ¶
func GetRetrievalPolicy(awsRegion string)
GetRetrievalPolicy - Get the current data retrieval policy for an account
func GetVaultAccessPolicy ¶
func GetVaultAccessPolicy(awsRegion, vaultName string)
GetVaultAccessPolicy - Get the access-policy set on the vault
func GetVaultArchive ¶
func GetVaultArchive(awsRegion, vaultName, jobID, fileName string)
GetVaultArchive - Get the output of a previously initiated job for archive retrieval GetJobOutput - Get the output of a previously initiated job, for instance inventory retrieval job that is identified by the job ID https://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html
func GetVaultLock ¶
func GetVaultLock(awsRegion, vaultName string)
GetVaultLock - Retrieve vault lock-policy related attributes that are set on a vault
func GetVautlInventory ¶
func GetVautlInventory(awsRegion, vaultName, jobID string)
GetVautlInventory - Get the output of a previously initiated job for inventory retrieval that is identified by the job ID
func InitArchiveRetrieval ¶
func InitArchiveRetrieval(awsRegion, vaultName, jobDescription, archiveID string)
InitArchiveRetrieval - Initiate an archive-retrieval job based on vault name
func InitInventoryRetrieval ¶
func InitInventoryRetrieval(awsRegion, vaultName, jobDescription string)
InitInventoryRetrieval - Initiate an inventory-retrieval job based on vault name
func InitJobInput ¶
func InitJobInput(awsRegion, vaultName string)
InitJobInput - Initiate an inventory-retrieval job based on vault name Resource - https://docs.aws.amazon.com/sdk-for-go/api/service/glacier/#example_Glacier_InitiateJob_shared00 This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval.
func InitiateVaultLock ¶
func InitiateVaultLock(awsRegion, vaultName, vaultPolicy string)
InitiateVaultLock - Installing a vault lock policy on the specified vault. Setting the lock state of vault lock to InProgress. Returning a lock ID, which is used to complete the vault locking process.
func ListJobs ¶
func ListJobs(awsRegion, vaultName string)
ListJobs - List all pending jobs per vault
func ListObjects ¶
func ListObjects(awsRegion, bucketName string)
ListObjects - List all objects in a bucket
func SetDataRetrievalPolicy ¶
SetDataRetrievalPolicy - Set and then enact a data retrieval policy
func SetDataRetrievalPolicyFreeTier ¶
func SetDataRetrievalPolicyFreeTier(awsRegion string)
SetDataRetrievalPolicyFreeTier - Set FreeTier retrieval policy
func SetupAWSAuth ¶
func SetupAWSAuth()
SetupAWSAuth - Create ~/.aws folder containing the conf and credentials
func UploadArchive ¶
func UploadArchive(awsRegion, vaultName, fileUpload string)
UploadArchive - Upload archive to vault Reference - https://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html More - https://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html
func UploadBucket ¶
func UploadBucket(awsRegion, bucketName, fileUpload string)
UploadBucket - Upload data to S3 bucket
func UserHomeDir ¶
func UserHomeDir() string
UserHomeDir - Determine the user home path depends on OS Type
Types ¶
type VaultInventory ¶
type VaultInventory struct { VaultARN string `json:"VaultARN"` InventoryDate time.Time `json:"InventoryDate"` ArchiveList []struct { ArchiveID string `json:"ArchiveId"` ArchiveDescription string `json:"ArchiveDescription"` CreationDate time.Time `json:"CreationDate"` Size int `json:"Size"` SHA256TreeHash string `json:"SHA256TreeHash"` } `json:"ArchiveList"` }
VaultInventory - Vault inventory struct used for unmarshaling data