storageClassToVolumeType maps a Pulumi S3 storageClass input value to the AWS pricing volumeType attribute used in the "Storage" product family.
(storageClass string)
| 33 | // storageClassToVolumeType maps a Pulumi S3 storageClass input value to the |
| 34 | // AWS pricing volumeType attribute used in the "Storage" product family. |
| 35 | func storageClassToVolumeType(storageClass string) string { |
| 36 | switch strings.ToUpper(strings.TrimSpace(storageClass)) { |
| 37 | case "STANDARD_IA": |
| 38 | return "Infrequent Access" |
| 39 | case "ONEZONE_IA": |
| 40 | return "One Zone - Infrequent Access" |
| 41 | case "INTELLIGENT_TIERING": |
| 42 | return "Intelligent-Tiering Frequent Access" |
| 43 | case "GLACIER": |
| 44 | return "Amazon Glacier" |
| 45 | case "GLACIER_IR": |
| 46 | return "Glacier Instant Retrieval" |
| 47 | case "DEEP_ARCHIVE": |
| 48 | return "Amazon Glacier" |
| 49 | case "REDUCED_REDUNDANCY": |
| 50 | return "Reduced Redundancy" |
| 51 | default: |
| 52 | // STANDARD and anything unrecognised → Standard |
| 53 | return "Standard" |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | // s3BucketProps builds the common display props for an S3 bucket resource. |
| 58 | func s3BucketProps(record resources.ResourceRecord) map[string]string { |
no outgoing calls
no test coverage detected