volcengine.vmp.NotifyGroupPolicy
Explore with Pulumi AI
Provides a resource to manage vmp notify group policy
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.vmp.NotifyGroupPolicy("foo", {
description: "acc-test-1",
levels: [
{
groupBies: ["__rule__"],
groupInterval: "30",
groupWait: "35",
level: "P2",
repeatInterval: "30",
},
{
groupBies: ["__rule__"],
groupInterval: "30",
groupWait: "30",
level: "P0",
repeatInterval: "30",
},
{
groupBies: ["__rule__"],
groupInterval: "45",
groupWait: "40",
level: "P1",
repeatInterval: "30",
},
],
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.vmp.NotifyGroupPolicy("foo",
description="acc-test-1",
levels=[
volcengine.vmp.NotifyGroupPolicyLevelArgs(
group_bies=["__rule__"],
group_interval="30",
group_wait="35",
level="P2",
repeat_interval="30",
),
volcengine.vmp.NotifyGroupPolicyLevelArgs(
group_bies=["__rule__"],
group_interval="30",
group_wait="30",
level="P0",
repeat_interval="30",
),
volcengine.vmp.NotifyGroupPolicyLevelArgs(
group_bies=["__rule__"],
group_interval="45",
group_wait="40",
level="P1",
repeat_interval="30",
),
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vmp"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmp.NewNotifyGroupPolicy(ctx, "foo", &vmp.NotifyGroupPolicyArgs{
Description: pulumi.String("acc-test-1"),
Levels: vmp.NotifyGroupPolicyLevelArray{
&vmp.NotifyGroupPolicyLevelArgs{
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupInterval: pulumi.String("30"),
GroupWait: pulumi.String("35"),
Level: pulumi.String("P2"),
RepeatInterval: pulumi.String("30"),
},
&vmp.NotifyGroupPolicyLevelArgs{
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupInterval: pulumi.String("30"),
GroupWait: pulumi.String("30"),
Level: pulumi.String("P0"),
RepeatInterval: pulumi.String("30"),
},
&vmp.NotifyGroupPolicyLevelArgs{
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupInterval: pulumi.String("45"),
GroupWait: pulumi.String("40"),
Level: pulumi.String("P1"),
RepeatInterval: pulumi.String("30"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Vmp.NotifyGroupPolicy("foo", new()
{
Description = "acc-test-1",
Levels = new[]
{
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
GroupBies = new[]
{
"__rule__",
},
GroupInterval = "30",
GroupWait = "35",
Level = "P2",
RepeatInterval = "30",
},
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
GroupBies = new[]
{
"__rule__",
},
GroupInterval = "30",
GroupWait = "30",
Level = "P0",
RepeatInterval = "30",
},
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
GroupBies = new[]
{
"__rule__",
},
GroupInterval = "45",
GroupWait = "40",
Level = "P1",
RepeatInterval = "30",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vmp.NotifyGroupPolicy;
import com.pulumi.volcengine.vmp.NotifyGroupPolicyArgs;
import com.pulumi.volcengine.vmp.inputs.NotifyGroupPolicyLevelArgs;
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 foo = new NotifyGroupPolicy("foo", NotifyGroupPolicyArgs.builder()
.description("acc-test-1")
.levels(
NotifyGroupPolicyLevelArgs.builder()
.groupBies("__rule__")
.groupInterval("30")
.groupWait("35")
.level("P2")
.repeatInterval("30")
.build(),
NotifyGroupPolicyLevelArgs.builder()
.groupBies("__rule__")
.groupInterval("30")
.groupWait("30")
.level("P0")
.repeatInterval("30")
.build(),
NotifyGroupPolicyLevelArgs.builder()
.groupBies("__rule__")
.groupInterval("45")
.groupWait("40")
.level("P1")
.repeatInterval("30")
.build())
.build());
}
}
resources:
foo:
type: volcengine:vmp:NotifyGroupPolicy
properties:
description: acc-test-1
levels:
- groupBies:
- __rule__
groupInterval: '30'
groupWait: '35'
level: P2
repeatInterval: '30'
- groupBies:
- __rule__
groupInterval: '30'
groupWait: '30'
level: P0
repeatInterval: '30'
- groupBies:
- __rule__
groupInterval: '45'
groupWait: '40'
level: P1
repeatInterval: '30'
Create NotifyGroupPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotifyGroupPolicy(name: string, args: NotifyGroupPolicyArgs, opts?: CustomResourceOptions);
@overload
def NotifyGroupPolicy(resource_name: str,
args: NotifyGroupPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotifyGroupPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
levels: Optional[Sequence[NotifyGroupPolicyLevelArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewNotifyGroupPolicy(ctx *Context, name string, args NotifyGroupPolicyArgs, opts ...ResourceOption) (*NotifyGroupPolicy, error)
public NotifyGroupPolicy(string name, NotifyGroupPolicyArgs args, CustomResourceOptions? opts = null)
public NotifyGroupPolicy(String name, NotifyGroupPolicyArgs args)
public NotifyGroupPolicy(String name, NotifyGroupPolicyArgs args, CustomResourceOptions options)
type: volcengine:vmp:NotifyGroupPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotifyGroupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotifyGroupPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotifyGroupPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotifyGroupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotifyGroupPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notifyGroupPolicyResource = new Volcengine.Vmp.NotifyGroupPolicy("notifyGroupPolicyResource", new()
{
Levels = new[]
{
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
GroupBies = new[]
{
"string",
},
GroupInterval = "string",
GroupWait = "string",
Level = "string",
RepeatInterval = "string",
},
},
Description = "string",
Name = "string",
});
example, err := vmp.NewNotifyGroupPolicy(ctx, "notifyGroupPolicyResource", &vmp.NotifyGroupPolicyArgs{
Levels: vmp.NotifyGroupPolicyLevelArray{
&vmp.NotifyGroupPolicyLevelArgs{
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
Level: pulumi.String("string"),
RepeatInterval: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var notifyGroupPolicyResource = new NotifyGroupPolicy("notifyGroupPolicyResource", NotifyGroupPolicyArgs.builder()
.levels(NotifyGroupPolicyLevelArgs.builder()
.groupBies("string")
.groupInterval("string")
.groupWait("string")
.level("string")
.repeatInterval("string")
.build())
.description("string")
.name("string")
.build());
notify_group_policy_resource = volcengine.vmp.NotifyGroupPolicy("notifyGroupPolicyResource",
levels=[{
"group_bies": ["string"],
"group_interval": "string",
"group_wait": "string",
"level": "string",
"repeat_interval": "string",
}],
description="string",
name="string")
const notifyGroupPolicyResource = new volcengine.vmp.NotifyGroupPolicy("notifyGroupPolicyResource", {
levels: [{
groupBies: ["string"],
groupInterval: "string",
groupWait: "string",
level: "string",
repeatInterval: "string",
}],
description: "string",
name: "string",
});
type: volcengine:vmp:NotifyGroupPolicy
properties:
description: string
levels:
- groupBies:
- string
groupInterval: string
groupWait: string
level: string
repeatInterval: string
name: string
NotifyGroupPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotifyGroupPolicy resource accepts the following input properties:
- Levels
List<Notify
Group Policy Level> - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - Description string
- The description of the notify group policy.
- Name string
- The name of the notify group policy.
- Levels
[]Notify
Group Policy Level Args - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - Description string
- The description of the notify group policy.
- Name string
- The name of the notify group policy.
- levels
List<Notify
Group Policy Level> - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - description String
- The description of the notify group policy.
- name String
- The name of the notify group policy.
- levels
Notify
Group Policy Level[] - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - description string
- The description of the notify group policy.
- name string
- The name of the notify group policy.
- levels
Sequence[Notify
Group Policy Level Args] - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - description str
- The description of the notify group policy.
- name str
- The name of the notify group policy.
- levels List<Property Map>
- The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - description String
- The description of the notify group policy.
- name String
- The name of the notify group policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotifyGroupPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NotifyGroupPolicy Resource
Get an existing NotifyGroupPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotifyGroupPolicyState, opts?: CustomResourceOptions): NotifyGroupPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
levels: Optional[Sequence[NotifyGroupPolicyLevelArgs]] = None,
name: Optional[str] = None) -> NotifyGroupPolicy
func GetNotifyGroupPolicy(ctx *Context, name string, id IDInput, state *NotifyGroupPolicyState, opts ...ResourceOption) (*NotifyGroupPolicy, error)
public static NotifyGroupPolicy Get(string name, Input<string> id, NotifyGroupPolicyState? state, CustomResourceOptions? opts = null)
public static NotifyGroupPolicy get(String name, Output<String> id, NotifyGroupPolicyState state, CustomResourceOptions options)
resources: _: type: volcengine:vmp:NotifyGroupPolicy get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- The description of the notify group policy.
- Levels
List<Notify
Group Policy Level> - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - Name string
- The name of the notify group policy.
- Description string
- The description of the notify group policy.
- Levels
[]Notify
Group Policy Level Args - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - Name string
- The name of the notify group policy.
- description String
- The description of the notify group policy.
- levels
List<Notify
Group Policy Level> - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - name String
- The name of the notify group policy.
- description string
- The description of the notify group policy.
- levels
Notify
Group Policy Level[] - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - name string
- The name of the notify group policy.
- description str
- The description of the notify group policy.
- levels
Sequence[Notify
Group Policy Level Args] - The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - name str
- The name of the notify group policy.
- description String
- The description of the notify group policy.
- levels List<Property Map>
- The levels of the notify group policy. Levels must be registered in three (
P0
,P1
,P2
) aggregation strategies, andLevel
cannot be repeated. - name String
- The name of the notify group policy.
Supporting Types
NotifyGroupPolicyLevel, NotifyGroupPolicyLevelArgs
- Group
Bies List<string> - The aggregate dimension, the value can be
__rule__
. - Group
Interval string - The aggregation cycle. Integer form, unit is second.
- Group
Wait string - The wait time. Integer form, unit is second.
- Level string
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - Repeat
Interval string - The notification cycle. Integer form, unit is second.
- Group
Bies []string - The aggregate dimension, the value can be
__rule__
. - Group
Interval string - The aggregation cycle. Integer form, unit is second.
- Group
Wait string - The wait time. Integer form, unit is second.
- Level string
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - Repeat
Interval string - The notification cycle. Integer form, unit is second.
- group
Bies List<String> - The aggregate dimension, the value can be
__rule__
. - group
Interval String - The aggregation cycle. Integer form, unit is second.
- group
Wait String - The wait time. Integer form, unit is second.
- level String
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - repeat
Interval String - The notification cycle. Integer form, unit is second.
- group
Bies string[] - The aggregate dimension, the value can be
__rule__
. - group
Interval string - The aggregation cycle. Integer form, unit is second.
- group
Wait string - The wait time. Integer form, unit is second.
- level string
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - repeat
Interval string - The notification cycle. Integer form, unit is second.
- group_
bies Sequence[str] - The aggregate dimension, the value can be
__rule__
. - group_
interval str - The aggregation cycle. Integer form, unit is second.
- group_
wait str - The wait time. Integer form, unit is second.
- level str
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - repeat_
interval str - The notification cycle. Integer form, unit is second.
- group
Bies List<String> - The aggregate dimension, the value can be
__rule__
. - group
Interval String - The aggregation cycle. Integer form, unit is second.
- group
Wait String - The wait time. Integer form, unit is second.
- level String
- The level of the policy, the value can be one of the following:
P0
,P1
,P2
. - repeat
Interval String - The notification cycle. Integer form, unit is second.
Import
VMP Notify Group Policy can be imported using the id, e.g.
$ pulumi import volcengine:vmp/notifyGroupPolicy:NotifyGroupPolicy default 60dde3ca-951c-4c05-8777-e5a7caa07ad6
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.