aws

package
v0.0.0-...-652547f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

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 CreateBucket

func CreateBucket(awsRegion, bucketName string)

CreateBucket - Create S3 bucket

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 DeleteBucket

func DeleteBucket(awsRegion, bucketName string)

DeleteBucket - Delete bucket

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 ListBuckets

func ListBuckets(awsRegion string)

ListBuckets - List of all buckets

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 ListVault

func ListVault(awsRegion string)

ListVault - List all vaults based on region

func SetDataRetrievalPolicy

func SetDataRetrievalPolicy(awsRegion, strategyPolicy string, bytesPerHour int64)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL