GoogleMonitoringService class final

Factory wrapper for google_monitoring_service.

A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern. In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible

serviceId is the user-supplied service identifier; the full resource name exposed by Cloud Monitoring will be projects/{project}/services/{serviceId}.

Modeling notes:

  • The Cloud Monitoring API has multiple service-type variants (basic_service, cloud_endpoints, app_engine, mesh_istio, cluster_istio, cloud_run, gke_namespace, gke_workload, gke_service), but the terraform-provider-google schema for this resource only surfaces basicService. Use the auto-detected variants by creating the service through the GCP API directly, or omit basicService entirely to register an opaque "custom" service identified solely by serviceId.
  • telemetry is server-populated (the underlying API derives the monitored resource name on create) and is therefore exposed as a getter, not a constructor input. See telemetry.
  • userLabels accepts up to 64 entries; both keys and values are capped at 63 characters (and 128 bytes).

Example (custom service identified by serviceId only):

final svc = GoogleMonitoringService(
  'checkout_api',
  serviceId: TfArg.literal('checkout-api'),
  displayName: TfArg.literal('Checkout API'),
  userLabels: TfArg.literal(const {'team': 'payments'}),
);

Example (well-known basic service with labels — selecting the service instance that emits the monitoring data):

final svc = GoogleMonitoringService(
  'app_engine_default',
  serviceId: TfArg.literal('appengine-default'),
  displayName: TfArg.literal('App Engine default service'),
  basicService: MonitoringServiceBasicService(
    serviceType: TfArgLiteral('APP_ENGINE'),
    serviceLabels: TfArgLiteral(const {'module_id': 'default'}),
  ),
);
Inheritance

Constructors

GoogleMonitoringService(String localName, {required TfArg<String> serviceId, TfArg<String>? displayName, MonitoringServiceBasicService? basicService, TfArg<Map<String, String>>? userLabels, TfArg<String>? project, LifecycleOptions? lifecycle, List<TfAddressed>? dependsOn, StackProvider? provider, TfTimeouts? timeouts})

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
defaultProvider → String
The provider name a block without provider uses: by default the prefix of terraformType (google for google_pubsub_topic).
no setterinherited
deletionPolicy → TfRef<String>
Reference to deletion_policy attribute.
no setter
dependsOn → List<TfAddressed>?
Optional depends_on = [...]: the resources, data sources and module calls this block waits for, e.g. dependsOn: [api, ...apiDeps]. Terraform takes whole blocks only, so an entry is never an attribute.
finalinherited
displayName → TfRef<String>
Reference to display_name attribute.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → TfRef<String>
Reference to id attribute.
no setter
kind → ResourceKind
Always ResourceKind.resource. Overridden by Data.
no setterinherited
lifecycle → LifecycleOptions?
Optional lifecycle { ... } block.
finalinherited
localName → String
User-supplied local name within a Stack.
finalinherited
name → TfRef<String>
Reference to name attribute.
no setter
project → TfRef<String>
Reference to project attribute.
no setter
provider → StackProvider?
Optional Terraform provider meta-argument: the provider configuration this block uses, e.g. the aliased GoogleProvider(alias: 'eu') the Stack registered with addProvider.
finalinherited
ref → RefTo<GoogleMonitoringService>
A reference to this resource, for arguments typed RefTo<GoogleMonitoringService>.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sensitiveFields → Set<String>
Field names that are @Sensitive per the IR-derived per-resource constant. Curated factories override with a baked-in static const Set<String> (file-private in v0.5+).
no setteroverride
serviceId → TfRef<String>
Reference to service_id attribute.
no setter
supportsDeletionProtection → bool
Capability flag: true when this resource's underlying Terraform schema has a deletion_protection boolean attribute that the synth-time devMode flow can flip to false. Defaults to false; the codegen emitter overrides this to true for wrappers whose schema includes the attribute.
no setterinherited
telemetry → TfRef<List<Map<String, Object?>>>
Reference to telemetry attribute.
no setter
terraformType → String
Terraform resource type, e.g. google_pubsub_topic.
finalinherited
tfAddress → String
Terraform address <terraformType>.<localName>, e.g. google_pubsub_topic.orders.
no setterinherited
timeouts → TfTimeouts?
Optional timeouts { ... } block: how long Terraform waits for each operation. Provider-neutral like lifecycle — synth copies the duration strings verbatim, and terraform validate decides whether this resource's schema declares the operations set here.
finalinherited
userLabels → TfRef<Map<String, String>>
Reference to user_labels attribute.
no setter

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

Constants

tfType → const String