public void SnowballCreateJob() { #region to-create-a-job-1482864834886 var response = client.CreateJob(new CreateJobRequest { AddressId = "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", Description = "My Job", JobType = "IMPORT", KmsKeyARN = "arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456", Notification = new Notification { JobStatesToNotify = new List <string> { }, NotifyAll = false }, Resources = new JobResource { S3Resources = new List <S3Resource> { new S3Resource { BucketArn = "arn:aws:s3:::MyBucket", KeyRange = new KeyRange { } } } }, RoleARN = "arn:aws:iam::123456789012:role/snowball-import-S3-role", ShippingOption = "SECOND_DAY", SnowballCapacityPreference = "T80", SnowballType = "STANDARD" }); string jobId = response.JobId; #endregion }
private Amazon.Snowball.Model.CreateJobResponse CallAWSServiceOperation(IAmazonSnowball client, Amazon.Snowball.Model.CreateJobRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Import/Export Snowball", "CreateJob"); try { #if DESKTOP return(client.CreateJob(request)); #elif CORECLR return(client.CreateJobAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }