MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / DecodeS3Bucket

Function DecodeS3Bucket

internal/pulumi/resources/aws/s3.go:74–102  ·  view source on GitHub ↗

DecodeS3Bucket splits an S3 Bucket (aws:s3/bucket:Bucket or aws:s3/bucketV2:BucketV2) into three pricing queries: - Storage (Standard by default; Intelligent-Tiering if configured) - Requests-PUT (PUT/COPY/POST/LIST — group S3-API-Tier1) - Requests-GET (GET and all other — group S3-API-Tier2)

(record resources.ResourceRecord, region, inputsJSON string)

Source from the content-addressed store, hash-verified

72// - Requests-PUT (PUT/COPY/POST/LIST — group S3-API-Tier1)
73// - Requests-GET (GET and all other — group S3-API-Tier2)
74func DecodeS3Bucket(record resources.ResourceRecord, region, inputsJSON string) []resources.DecodedResource {
75 props := s3BucketProps(record)
76
77 // Determine storage class from the bucket's intelligentTieringConfigurations
78 // or accelerationStatus as a hint; default to Standard.
79 volumeType := "Standard"
80
81 return []resources.DecodedResource{
82 s3Entry(record, region, inputsJSON, "Storage",
83 map[string]string{
84 "productFamily": "Storage",
85 "volumeType": volumeType,
86 "storageClass": "General Purpose",
87 },
88 props),
89 s3Entry(record, region, inputsJSON, "Requests-PUT",
90 map[string]string{
91 "productFamily": "API Request",
92 "group": "S3-API-Tier1",
93 },
94 props),
95 s3Entry(record, region, inputsJSON, "Requests-GET",
96 map[string]string{
97 "productFamily": "API Request",
98 "group": "S3-API-Tier2",
99 },
100 props),
101 }
102}
103
104// DecodeS3BucketObject maps an S3 BucketObject / BucketObjectv2 to a single
105// Storage pricing query. The storageClass input determines the volumeType.

Callers

nothing calls this directly

Calls 2

s3BucketPropsFunction · 0.85
s3EntryFunction · 0.85

Tested by

no test coverage detected