GoogleStorageBucketObject class final
Factory wrapper for google_storage_bucket_object.
Pass TfArg.ref(bucket.nameRef) for bucket — NOT bucket.id
(id is {bucket-name} for buckets but the API wants just the name).
body: object payload — choose exactly one of:
- StorageBucketObjectBucketObjectFromSource — upload from a local file path.
- StorageBucketObjectBucketObjectFromContent — inline string payload.
The sealed StorageBucketObjectBucketObjectContent type makes the
source/contentexactly_one_ofconstraint exhaustive at the type level.
Example (inline content):
final assets = GoogleStorageBucket(
localName: 'assets',
name: TfArg.literal('my-app-assets-prod'),
location: TfArg.literal('ASIA-NORTHEAST1'),
);
final config = GoogleStorageBucketObject(
localName: 'config',
bucket: TfArg.ref(assets.nameRef),
name: TfArg.literal('config/app.json'),
body: StorageBucketObjectBucketObjectFromContent(
content: TfArg.literal('{"feature_x": true}'),
),
contentType: TfArg.literal('application/json'),
storageClass: TfArg.literal(BucketObjectStorageClass.standard),
);
Example (file upload):
final logo = GoogleStorageBucketObject(
localName: 'logo',
bucket: TfArg.ref(assets.nameRef),
name: TfArg.literal('static/logo.png'),
body: StorageBucketObjectBucketObjectFromSource(source: TfArg.literal('./assets/logo.png')),
contentType: TfArg.literal('image/png'),
);
Constructors
-
GoogleStorageBucketObject({required String localName, required TfArg<
String> bucket, required TfArg<String> name, required StorageBucketObjectBucketObjectContent body, TfArg<String> ? contentType, TfArg<String> ? cacheControl, TfArg<String> ? contentDisposition, TfArg<String> ? contentEncoding, TfArg<String> ? contentLanguage, TfArg<BucketObjectStorageClass> ? storageClass, TfArg<String> ? kmsKeyName, TfArg<Map< ? metadata, TfArg<String, String> >bool> ? eventBasedHold, TfArg<bool> ? temporaryHold, TfArg<bool> ? forceEmptyContentType, TfArg<String> ? detectMd5hash, TfArg<String> ? sourceMd5hash, TfArg<String> ? deletionPolicy, StorageBucketObjectCustomerEncryption? customerEncryption, StorageBucketObjectBucketObjectRetention? retention, LifecycleOptions? lifecycle, List<DependencyTarget> ? dependsOn})
Properties
-
argMap
→ Map<
String, TfArg?> -
Argument-name → TfArg map. Keys are snake_case (Terraform JSON name).
Synth emits these keys directly; the factory is responsible for the
camelCase → snake_case translation at construction time.
finalinherited
-
crc32c
→ TfRef<
String> -
Reference to
crc32cattribute.no setter -
dependsOn
→ List<
DependencyTarget> ? -
Optional
depends_on = [...]. Each entry is aDependencyTarget— either a wholesale resource (rendered as bare address) or an explicitTfRef(rendered viabareAddress).finalinherited -
generation
→ TfRef<
num> -
Reference to
generationattribute.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
→ TfRef<
String> -
Reference to
idattribute.no setter - kind → ResourceKind
-
Always
ResourceKind.resource. Overridden byData.no setterinherited - lifecycle → LifecycleOptions?
-
Optional
lifecycle { ... }block.finalinherited - localName → String
-
User-supplied local name within a Stack.
finalinherited
-
md5hash
→ TfRef<
String> -
Reference to
md5hashattribute.no setter -
md5hexhash
→ TfRef<
String> -
Reference to
md5hexhashattribute.no setter -
mediaLink
→ TfRef<
String> -
Reference to
media_linkattribute.no setter -
nameRef
→ TfRef<
String> -
Reference to
nameattribute.no setter -
outputName
→ TfRef<
String> -
Reference to
output_nameattribute.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfLink
→ TfRef<
String> -
Reference to
self_linkattribute.no setter -
sensitiveFields
→ Set<
String> -
Field names that are
@Sensitiveper the IR-derived per-resource constant. Curated factories override with a baked-instatic const Set<String>(file-private in v0.5+).no setter - supportsDeletionProtection → bool
-
Capability flag: true when this resource's underlying Terraform
schema has a
deletion_protectionboolean attribute that the synth-time devMode flow can flip tofalse. Defaults to false; the codegen emitter overrides this totruefor wrappers whose schema includes the attribute.no setterinherited - terraformType → String
-
Terraform resource type, e.g.
google_pubsub_topic.finalinherited - tfAddress → String
-
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited