MetricDescriptor constructor

MetricDescriptor(
  1. String name, {
  2. MetricDescriptorArgs? args,
  3. CustomResourceOptions? options,
})

Creates a new MetricDescriptor. name The Pulumi resource name. args Arguments used to configure this MetricDescriptor. The set of arguments for MetricDescriptor. options Resource options controlling this resource's behavior.

Implementation

MetricDescriptor(
  String name, {
  MetricDescriptorArgs? args,
  pulumi.CustomResourceOptions? options,
}) : super(
        'gcp:monitoring/metricDescriptor:MetricDescriptor',
        name,
        pulumi.Input.mapToInputs(args?.toMap() ?? const {}),
        pulumi.CustomResourceOptions(version: '9.36.1').merge(options),
      ) {
  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');
}