AlertPolicy constructor
AlertPolicy(
- String name, {
- AlertPolicyArgs? args,
- CustomResourceOptions? options,
Creates a new AlertPolicy.
name The Pulumi resource name.
args Arguments used to configure this AlertPolicy. The set of arguments for AlertPolicy.
options Resource options controlling this resource's behavior.
Implementation
AlertPolicy(
String name, {
AlertPolicyArgs? args,
pulumi.CustomResourceOptions? options,
}) : super(
'gcp:monitoring/alertPolicy:AlertPolicy',
name,
pulumi.Input.mapToInputs(args?.toMap() ?? const {}),
pulumi.CustomResourceOptions(version: '9.36.1').merge(options),
) {
alertStrategy = registerOutput<AlertPolicyAlertStrategy?>('alertStrategy', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return AlertPolicyAlertStrategy.fromMap((guardedValue as Map).cast<String, dynamic>()); });
combiner = registerOutput<String>('combiner');
conditions = registerOutput<List<AlertPolicyCondition>>('conditions', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return pulumi.Input.decodeList<AlertPolicyCondition>(guardedValue, (value) => AlertPolicyCondition.fromMap((value as Map).cast<String, dynamic>())); });
creationRecords = registerOutput<List<AlertPolicyCreationRecord>>('creationRecords', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return pulumi.Input.decodeList<AlertPolicyCreationRecord>(guardedValue, (value) => AlertPolicyCreationRecord.fromMap((value as Map).cast<String, dynamic>())); });
deletionPolicy = registerOutput<String>('deletionPolicy');
displayName = registerOutput<String>('displayName');
documentation = registerOutput<AlertPolicyDocumentation?>('documentation', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return AlertPolicyDocumentation.fromMap((guardedValue as Map).cast<String, dynamic>()); });
enabled = registerOutput<bool?>('enabled');
this.name = registerOutput<String>('name');
notificationChannels = registerOutput<List<String>?>('notificationChannels', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return (guardedValue as List).cast<String>(); });
project = registerOutput<String>('project');
severity = registerOutput<String?>('severity');
userLabels = registerOutput<Map<String, String>?>('userLabels', decoder: (raw) { final guardedValue = raw; if (guardedValue == null) return null; return (guardedValue as Map).cast<String, String>(); });
}