MetricDescriptor.reference constructor

MetricDescriptor.reference(
  1. String urn
)

Creates a typed reference to an existing MetricDescriptor resource.

Implementation

MetricDescriptor.reference(String urn)
  : super(
      'gcp:monitoring/metricDescriptor:MetricDescriptor',
      pulumi.parseUrn(urn).urnName,
      const <String, pulumi.Input<dynamic>>{},
      pulumi.CustomResourceOptions(urn: pulumi.input(urn)),
      isResourceReference: true,
    ) {
  deletionPolicy = registerOutput<String>('deletionPolicy');
  description = registerOutput<String?>('description');
  displayName = registerOutput<String?>('displayName');
  labels = registerOutput<List<MetricDescriptorLabel>?>('labels', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return pulumi.Input.decodeList<MetricDescriptorLabel>(guardedValue, (value) => MetricDescriptorLabel.fromMap((value as Map).cast<String, dynamic>())); });
  launchStage = registerOutput<String?>('launchStage');
  metadata = registerOutput<MetricDescriptorMetadata?>('metadata', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return MetricDescriptorMetadata.fromMap((guardedValue as Map).cast<String, dynamic>()); });
  metricKind = registerOutput<String>('metricKind');
  monitoredResourceTypes = registerOutput<List<String>>('monitoredResourceTypes', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return (guardedValue as List).cast<String>(); });
  this.name = registerOutput<String>('name');
  project = registerOutput<String>('project');
  type = registerOutput<String>('type');
  unit = registerOutput<String?>('unit');
  valueType = registerOutput<String>('valueType');
}