Class MonitoringAlertPolicyConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.monitoring_alert_policy.MonitoringAlertPolicyConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MonitoringAlertPolicyConfig>
- Enclosing interface:
- MonitoringAlertPolicyConfig
@Stability(Stable) public static final class MonitoringAlertPolicyConfig.Builder extends Object implements software.amazon.jsii.Builder<MonitoringAlertPolicyConfig>
A builder forMonitoringAlertPolicyConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
combiner
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder combiner(String combiner)
Sets the value ofMonitoringAlertPolicyConfig.getCombiner()- Parameters:
combiner- How to combine the results of multiple conditions to determine if an incident should be opened. This parameter is required. Possible values: ["AND", "OR", "AND_WITH_MATCHING_RESOURCE"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#combiner MonitoringAlertPolicy#combiner}- Returns:
this
-
conditions
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder conditions(com.hashicorp.cdktf.IResolvable conditions)
Sets the value ofMonitoringAlertPolicyConfig.getConditions()- Parameters:
conditions- conditions block. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#conditions MonitoringAlertPolicy#conditions}- Returns:
this
-
conditions
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder conditions(List<? extends MonitoringAlertPolicyConditions> conditions)
Sets the value ofMonitoringAlertPolicyConfig.getConditions()- Parameters:
conditions- conditions block. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#conditions MonitoringAlertPolicy#conditions}- Returns:
this
-
displayName
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder displayName(String displayName)
Sets the value ofMonitoringAlertPolicyConfig.getDisplayName()- Parameters:
displayName- A short name or phrase used to identify the policy in dashboards, notifications, and incidents. This parameter is required. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#display_name MonitoringAlertPolicy#display_name}- Returns:
this
-
alertStrategy
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder alertStrategy(MonitoringAlertPolicyAlertStrategy alertStrategy)
Sets the value ofMonitoringAlertPolicyConfig.getAlertStrategy()- Parameters:
alertStrategy- alert_strategy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#alert_strategy MonitoringAlertPolicy#alert_strategy}- Returns:
this
-
documentation
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder documentation(MonitoringAlertPolicyDocumentation documentation)
Sets the value ofMonitoringAlertPolicyConfig.getDocumentation()- Parameters:
documentation- documentation block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#documentation MonitoringAlertPolicy#documentation}- Returns:
this
-
enabled
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder enabled(Boolean enabled)
Sets the value ofMonitoringAlertPolicyConfig.getEnabled()- Parameters:
enabled- Whether or not the policy is enabled. The default is true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#enabled MonitoringAlertPolicy#enabled}- Returns:
this
-
enabled
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder enabled(com.hashicorp.cdktf.IResolvable enabled)
Sets the value ofMonitoringAlertPolicyConfig.getEnabled()- Parameters:
enabled- Whether or not the policy is enabled. The default is true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#enabled MonitoringAlertPolicy#enabled}- Returns:
this
-
id
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder id(String id)
Sets the value ofMonitoringAlertPolicyConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#id MonitoringAlertPolicy#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
notificationChannels
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder notificationChannels(List<String> notificationChannels)
Sets the value ofMonitoringAlertPolicyConfig.getNotificationChannels()- Parameters:
notificationChannels- Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the notificationChannels.list method. The syntax of the entries in this field is 'projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#notification_channels MonitoringAlertPolicy#notification_channels}- Returns:
this
-
project
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder project(String project)
Sets the value ofMonitoringAlertPolicyConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#project MonitoringAlertPolicy#project}.- Returns:
this
-
severity
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder severity(String severity)
Sets the value ofMonitoringAlertPolicyConfig.getSeverity()- Parameters:
severity- The severity of an alert policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications. Possible values: ["CRITICAL", "ERROR", "WARNING"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#severity MonitoringAlertPolicy#severity}- Returns:
this
-
timeouts
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder timeouts(MonitoringAlertPolicyTimeouts timeouts)
Sets the value ofMonitoringAlertPolicyConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#timeouts MonitoringAlertPolicy#timeouts}- Returns:
this
-
userLabels
@Stability(Stable) public MonitoringAlertPolicyConfig.Builder userLabels(Map<String,String> userLabels)
Sets the value ofMonitoringAlertPolicyConfig.getUserLabels()- Parameters:
userLabels- This field is intended to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_alert_policy#user_labels MonitoringAlertPolicy#user_labels}- Returns:
this
-
connection
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public MonitoringAlertPolicyConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public MonitoringAlertPolicyConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MonitoringAlertPolicyConfig>- Returns:
- a new instance of
MonitoringAlertPolicyConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-