Function: AWS EC2 Snapshot Restore Tier

by Simon Sparks · 7 February 2026

To use this function add it to the class library file named OrchestratorPluginAWSService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorPluginAWSService.ts

Description: Orchestrator Function to Restore Snapshot Tier of AWS EC2 Snapshot

Public Function: EC2SnapshotRestoreTier

public EC2SnapshotRestoreTier(objAWSClient: AWSClient, strSnapshotId: string, blnPermanentRestore: boolean = true): EC2RestoreSnapshotTierResult {

    let objAmazonEC2Client: AmazonEC2Client = objAWSClient.getAmazonEC2Client();

    let objEC2RestoreSnapshotTierRequest: EC2RestoreSnapshotTierRequest = new EC2RestoreSnapshotTierRequest();
    objEC2RestoreSnapshotTierRequest.setSnapshotId(strSnapshotId);
    objEC2RestoreSnapshotTierRequest.setPermanentRestore(blnPermanentRestore);

    let objEC2RestoreSnapshotTierResult: EC2RestoreSnapshotTierResult = objAmazonEC2Client.restoreSnapshotTier(objEC2RestoreSnapshotTierRequest);

    return objEC2RestoreSnapshotTierResult;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like