public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonStorageGatewayConfig config = new AmazonStorageGatewayConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonStorageGatewayClient client = new AmazonStorageGatewayClient(creds, config); DescribeTapeRecoveryPointsResponse resp = new DescribeTapeRecoveryPointsResponse(); do { DescribeTapeRecoveryPointsRequest req = new DescribeTapeRecoveryPointsRequest { Marker = resp.Marker , Limit = maxItems }; resp = client.DescribeTapeRecoveryPoints(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.TapeRecoveryPointInfos) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.Marker)); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonStorageGatewayConfig config = new AmazonStorageGatewayConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonStorageGatewayClient client = new AmazonStorageGatewayClient(creds, config); ListFileSystemAssociationsResponse resp = new ListFileSystemAssociationsResponse(); do { ListFileSystemAssociationsRequest req = new ListFileSystemAssociationsRequest { Marker = resp.NextMarker , Limit = maxItems }; resp = client.ListFileSystemAssociations(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.FileSystemAssociationSummaryList) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextMarker)); }
protected IAmazonStorageGateway CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonStorageGatewayConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonStorageGatewayClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }
public void StorageGatewayDisableGateway() { #region to-disable-a-gateway-when-it-is-no-longer-functioning-1472076046936 var client = new AmazonStorageGatewayClient(); var response = client.DisableGateway(new DisableGatewayRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayDescribeChapCredentials() { #region to-describe-chap-credetnitals-for-an-iscsi-1471467462967 var client = new AmazonStorageGatewayClient(); var response = client.DescribeChapCredentials(new DescribeChapCredentialsRequest { TargetARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" }); List <ChapInfo> chapCredentials = response.ChapCredentials; #endregion }
public void StorageGatewayUpdateGatewaySoftwareNow() { #region to-update-a-gateways-vm-software-1472152020929 var client = new AmazonStorageGatewayClient(); var response = client.UpdateGatewaySoftwareNow(new UpdateGatewaySoftwareNowRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayStartGateway() { #region to-start-a-gateway-service-1472150722315 var client = new AmazonStorageGatewayClient(); var response = client.StartGateway(new StartGatewayRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayDeleteTapeArchive() { #region to-delete-a-virtual-tape-from-the-shelf-vts-1471383964329 var client = new AmazonStorageGatewayClient(); var response = client.DeleteTapeArchive(new DeleteTapeArchiveRequest { TapeARN = "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewayDeleteVolume() { #region to-delete-a-gateway-volume-1471384418416 var client = new AmazonStorageGatewayClient(); var response = client.DeleteVolume(new DeleteVolumeRequest { VolumeARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" }); string volumeARN = response.VolumeARN; #endregion }
public void StorageGatewayDeleteSnapshotSchedule() { #region to-delete-a-snapshot-of-a-volume-1471382234377 var client = new AmazonStorageGatewayClient(); var response = client.DeleteSnapshotSchedule(new DeleteSnapshotScheduleRequest { VolumeARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" }); string volumeARN = response.VolumeARN; #endregion }
public void StorageGatewayDeleteGateway() { #region to-delete-a-gatgeway-1471381697333 var client = new AmazonStorageGatewayClient(); var response = client.DeleteGateway(new DeleteGatewayRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayResetCache() { #region to-reset-cache-disks-in-error-status-1472148909807 var client = new AmazonStorageGatewayClient(); var response = client.ResetCache(new ResetCacheRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayUpdateVTLDeviceType() { #region to-update-a-vtl-device-type-1472153012967 var client = new AmazonStorageGatewayClient(); var response = client.UpdateVTLDeviceType(new UpdateVTLDeviceTypeRequest { DeviceType = "Medium Changer", VTLDeviceARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_MEDIACHANGER_00001" }); string vtlDeviceARN = response.VTLDeviceARN; #endregion }
public void StorageGatewayDeleteTape() { #region to-delete-a-virtual-tape-1471382444157 var client = new AmazonStorageGatewayClient(); var response = client.DeleteTape(new DeleteTapeRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:204469490176:gateway/sgw-12A3456B", TapeARN = "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewayCancelRetrieval() { #region to-cancel-virtual-tape-retrieval-1471295704491 var client = new AmazonStorageGatewayClient(); var response = client.CancelRetrieval(new CancelRetrievalRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", TapeARN = "arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4" }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewayDeleteBandwidthRateLimit() { #region to-delete-bandwidth-rate-limits-of-gateway-1471373225520 var client = new AmazonStorageGatewayClient(); var response = client.DeleteBandwidthRateLimit(new DeleteBandwidthRateLimitRequest { BandwidthType = "All", GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayRetrieveTapeRecoveryPoint() { #region to-retrieve-the-recovery-point-of-a-virtual-tape-1472150014805 var client = new AmazonStorageGatewayClient(); var response = client.RetrieveTapeRecoveryPoint(new RetrieveTapeRecoveryPointRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", TapeARN = "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF" }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewaySetLocalConsolePassword() { #region to-set-a-password-for-your-vm-1472150202632 var client = new AmazonStorageGatewayClient(); var response = client.SetLocalConsolePassword(new SetLocalConsolePasswordRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", LocalConsolePassword = "******" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayRetrieveTapeArchive() { #region to-retrieve-an-archived-tape-from-the-vts-1472149812358 var client = new AmazonStorageGatewayClient(); var response = client.RetrieveTapeArchive(new RetrieveTapeArchiveRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", TapeARN = "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF" }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewayListVolumeRecoveryPoints() { #region to-list-recovery-points-for-a-gateway-1472143015088 var client = new AmazonStorageGatewayClient(); var response = client.ListVolumeRecoveryPoints(new ListVolumeRecoveryPointsRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; List <VolumeRecoveryPointInfo> volumeRecoveryPointInfos = response.VolumeRecoveryPointInfos; #endregion }
public void StorageGatewayListLocalDisks() { #region to-list-the-gateways-local-disks-1472079564618 var client = new AmazonStorageGatewayClient(); var response = client.ListLocalDisks(new ListLocalDisksRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); List <Disk> disks = response.Disks; string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayDescribeStorediSCSIVolumes() { #region to-describe-the-volumes-of-a-gateway-1471472640660 var client = new AmazonStorageGatewayClient(); var response = client.DescribeStorediSCSIVolumes(new DescribeStorediSCSIVolumesRequest { VolumeARNs = new List <string> { "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" } }); List <StorediSCSIVolume> storediSCSIVolumes = response.StorediSCSIVolumes; #endregion }
public void StorageGatewayDescribeBandwidthRateLimit() { #region to-describe-the-bandwidth-rate-limits-of-a-gateway-1471384826404 var client = new AmazonStorageGatewayClient(); var response = client.DescribeBandwidthRateLimit(new DescribeBandwidthRateLimitRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); long averageDownloadRateLimitInBitsPerSec = response.AverageDownloadRateLimitInBitsPerSec; long averageUploadRateLimitInBitsPerSec = response.AverageUploadRateLimitInBitsPerSec; string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayUpdateBandwidthRateLimit() { #region to-update-the-bandwidth-rate-limits-of-a-gateway-1472151016202 var client = new AmazonStorageGatewayClient(); var response = client.UpdateBandwidthRateLimit(new UpdateBandwidthRateLimitRequest { AverageDownloadRateLimitInBitsPerSec = 102400, AverageUploadRateLimitInBitsPerSec = 51200, GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" }); string gatewayARN = response.GatewayARN; #endregion }
public void StorageGatewayDescribeCachediSCSIVolumes() { #region to-describe-gateway-cached-iscsi-volumes-1471458094649 var client = new AmazonStorageGatewayClient(); var response = client.DescribeCachediSCSIVolumes(new DescribeCachediSCSIVolumesRequest { VolumeARNs = new List <string> { "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" } }); List <CachediSCSIVolume> cachediSCSIVolumes = response.CachediSCSIVolumes; #endregion }
public void StorageGatewayDeleteChapCredentials() { #region to-delete-chap-credentials-1471375025612 var client = new AmazonStorageGatewayClient(); var response = client.DeleteChapCredentials(new DeleteChapCredentialsRequest { InitiatorName = "iqn.1991-05.com.microsoft:computername.domain.example.com", TargetARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" }); string initiatorName = response.InitiatorName; string targetARN = response.TargetARN; #endregion }
public void StorageGatewayCreateTapeWithBarcode() { #region to-create-a-virtual-tape-using-a-barcode-1471371842452 var client = new AmazonStorageGatewayClient(); var response = client.CreateTapeWithBarcode(new CreateTapeWithBarcodeRequest { GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", TapeBarcode = "TEST12345", TapeSizeInBytes = 107374182400 }); string tapeARN = response.TapeARN; #endregion }
public void StorageGatewayListGateways() { #region to-lists-region-specific-gateways-per-aws-account-1472077860657 var client = new AmazonStorageGatewayClient(); var response = client.ListGateways(new ListGatewaysRequest { Limit = 2, Marker = "1" }); List <GatewayInfo> gateways = response.Gateways; string marker = response.Marker; #endregion }
public void StorageGatewayCreateSnapshot() { #region to-create-a-snapshot-of-a-gateway-volume-1471301469561 var client = new AmazonStorageGatewayClient(); var response = client.CreateSnapshot(new CreateSnapshotRequest { SnapshotDescription = "My root volume snapshot as of 10/03/2017", VolumeARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" }); string snapshotId = response.SnapshotId; string volumeARN = response.VolumeARN; #endregion }
public void StorageGatewayUpdateSnapshotSchedule() { #region to-update-a-volume-snapshot-schedule-1472152757068 var client = new AmazonStorageGatewayClient(); var response = client.UpdateSnapshotSchedule(new UpdateSnapshotScheduleRequest { Description = "Hourly snapshot", RecurrenceInHours = 1, StartAt = 0, VolumeARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" }); string volumeARN = response.VolumeARN; #endregion }