com.pulumi.alicloud.cms.AlarmContactGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.cms;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
import com.pulumi.alicloud.cms.inputs.AlarmContactGroupState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a CMS Alarm Contact Group resource.
*
* For information about CMS Alarm Contact Group and how to use it, see [What is Alarm Contact Group](https://www.alibabacloud.com/help/en/cloudmonitor/latest/putcontactgroup).
*
* > **NOTE:** Available since v1.101.0.
*
* ## Example Usage
*
* Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.cms.AlarmContactGroup;
* import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new AlarmContactGroup("example", AlarmContactGroupArgs.builder()
* .alarmContactGroupName("tf-example")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* CMS Alarm Contact Group can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:cms/alarmContactGroup:AlarmContactGroup example tf-testacc123
* ```
*
*/
@ResourceType(type="alicloud:cms/alarmContactGroup:AlarmContactGroup")
public class AlarmContactGroup extends com.pulumi.resources.CustomResource {
/**
* The name of the alarm group.
*
*/
@Export(name="alarmContactGroupName", refs={String.class}, tree="[0]")
private Output alarmContactGroupName;
/**
* @return The name of the alarm group.
*
*/
public Output alarmContactGroupName() {
return this.alarmContactGroupName;
}
/**
* The name of the alert contact.
*
*/
@Export(name="contacts", refs={List.class,String.class}, tree="[0,1]")
private Output> contacts;
/**
* @return The name of the alert contact.
*
*/
public Output>> contacts() {
return Codegen.optional(this.contacts);
}
/**
* The description of the alert group.
*
*/
@Export(name="describe", refs={String.class}, tree="[0]")
private Output describe;
/**
* @return The description of the alert group.
*
*/
public Output> describe() {
return Codegen.optional(this.describe);
}
/**
* Whether to open weekly subscription.
*
*/
@Export(name="enableSubscribed", refs={Boolean.class}, tree="[0]")
private Output enableSubscribed;
/**
* @return Whether to open weekly subscription.
*
*/
public Output enableSubscribed() {
return this.enableSubscribed;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public AlarmContactGroup(String name) {
this(name, AlarmContactGroupArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public AlarmContactGroup(String name, AlarmContactGroupArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public AlarmContactGroup(String name, AlarmContactGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cms/alarmContactGroup:AlarmContactGroup", name, args == null ? AlarmContactGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private AlarmContactGroup(String name, Output id, @Nullable AlarmContactGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cms/alarmContactGroup:AlarmContactGroup", name, state, makeResourceOptions(options, id));
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static AlarmContactGroup get(String name, Output id, @Nullable AlarmContactGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new AlarmContactGroup(name, id, state, options);
}
}