From 1dc4e1000bdd82ce7937709f8d867a39b1f93d46 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Tue, 5 Nov 2024 13:16:25 +0100 Subject: [PATCH] Apply auto-mapping --- .../bridge-metadata.json | 15 +- .../cmd/pulumi-resource-grafana/schema.json | 192 ++++---- provider/resources.go | 336 +------------ sdk/dotnet/CloudAccessPolicy.cs | 4 - sdk/dotnet/CloudAccessPolicyToken.cs | 4 - sdk/dotnet/CloudOrgMember.cs | 4 - sdk/dotnet/CloudPluginInstallation.cs | 4 - sdk/dotnet/CloudStack.cs | 4 - sdk/dotnet/CloudStackServiceAccount.cs | 4 - sdk/dotnet/CloudStackServiceAccountToken.cs | 4 - sdk/dotnet/MachineLearningHoliday.cs | 4 - sdk/dotnet/MachineLearningJob.cs | 4 - sdk/dotnet/MachineLearningOutlierDetector.cs | 4 - sdk/dotnet/OnCall/UserNotificationRule.cs | 262 ++++++++++ sdk/dotnet/OncallEscalation.cs | 4 - sdk/dotnet/OncallEscalationChain.cs | 4 - sdk/dotnet/OncallIntegration.cs | 4 - sdk/dotnet/OncallOnCallShift.cs | 4 - sdk/dotnet/OncallOutgoingWebhook.cs | 4 - sdk/dotnet/OncallRoute.cs | 4 - sdk/dotnet/OncallSchedule.cs | 4 - sdk/dotnet/OncallUserNotificationRule.cs | 17 +- sdk/dotnet/SyntheticMonitoringCheck.cs | 4 - sdk/dotnet/SyntheticMonitoringInstallation.cs | 4 - sdk/dotnet/SyntheticMonitoringProbe.cs | 4 - sdk/go/grafana/cloudAccessPolicy.go | 6 - sdk/go/grafana/cloudAccessPolicyToken.go | 6 - sdk/go/grafana/cloudOrgMember.go | 6 - sdk/go/grafana/cloudPluginInstallation.go | 6 - sdk/go/grafana/cloudStack.go | 6 - sdk/go/grafana/cloudStackServiceAccount.go | 6 - .../grafana/cloudStackServiceAccountToken.go | 6 - sdk/go/grafana/machineLearningHoliday.go | 6 - sdk/go/grafana/machineLearningJob.go | 6 - .../grafana/machineLearningOutlierDetector.go | 6 - sdk/go/grafana/oncall/init.go | 7 + sdk/go/grafana/oncall/userNotificationRule.go | 392 +++++++++++++++ sdk/go/grafana/oncallEscalation.go | 6 - sdk/go/grafana/oncallEscalationChain.go | 6 - sdk/go/grafana/oncallIntegration.go | 6 - sdk/go/grafana/oncallOnCallShift.go | 6 - sdk/go/grafana/oncallOutgoingWebhook.go | 6 - sdk/go/grafana/oncallRoute.go | 6 - sdk/go/grafana/oncallSchedule.go | 6 - sdk/go/grafana/oncallUserNotificationRule.go | 19 +- sdk/go/grafana/syntheticMonitoringCheck.go | 6 - .../syntheticMonitoringInstallation.go | 6 - sdk/go/grafana/syntheticMonitoringProbe.go | 6 - sdk/nodejs/cloudAccessPolicy.ts | 2 - sdk/nodejs/cloudAccessPolicyToken.ts | 2 - sdk/nodejs/cloudOrgMember.ts | 2 - sdk/nodejs/cloudPluginInstallation.ts | 2 - sdk/nodejs/cloudStack.ts | 2 - sdk/nodejs/cloudStackServiceAccount.ts | 2 - sdk/nodejs/cloudStackServiceAccountToken.ts | 2 - sdk/nodejs/machineLearningHoliday.ts | 2 - sdk/nodejs/machineLearningJob.ts | 2 - sdk/nodejs/machineLearningOutlierDetector.ts | 2 - sdk/nodejs/oncall/index.ts | 8 + sdk/nodejs/oncall/userNotificationRule.ts | 214 +++++++++ sdk/nodejs/oncallEscalation.ts | 2 - sdk/nodejs/oncallEscalationChain.ts | 2 - sdk/nodejs/oncallIntegration.ts | 2 - sdk/nodejs/oncallOnCallShift.ts | 2 - sdk/nodejs/oncallOutgoingWebhook.ts | 2 - sdk/nodejs/oncallRoute.ts | 2 - sdk/nodejs/oncallSchedule.ts | 2 - sdk/nodejs/oncallUserNotificationRule.ts | 22 +- sdk/nodejs/syntheticMonitoringCheck.ts | 2 - sdk/nodejs/syntheticMonitoringInstallation.ts | 2 - sdk/nodejs/syntheticMonitoringProbe.ts | 2 - sdk/nodejs/tsconfig.json | 1 + sdk/python/pulumiverse_grafana/__init__.py | 8 + .../cloud_access_policy.py | 2 - .../cloud_access_policy_token.py | 2 - .../pulumiverse_grafana/cloud_org_member.py | 2 - .../cloud_plugin_installation.py | 2 - sdk/python/pulumiverse_grafana/cloud_stack.py | 2 - .../cloud_stack_service_account.py | 2 - .../cloud_stack_service_account_token.py | 2 - .../machine_learning_holiday.py | 2 - .../machine_learning_job.py | 2 - .../machine_learning_outlier_detector.py | 2 - .../pulumiverse_grafana/oncall/__init__.py | 1 + .../oncall/user_notification_rule.py | 454 ++++++++++++++++++ .../pulumiverse_grafana/oncall_escalation.py | 2 - .../oncall_escalation_chain.py | 2 - .../pulumiverse_grafana/oncall_integration.py | 2 - .../oncall_on_call_shift.py | 2 - .../oncall_outgoing_webhook.py | 2 - .../pulumiverse_grafana/oncall_route.py | 2 - .../pulumiverse_grafana/oncall_schedule.py | 2 - .../oncall_user_notification_rule.py | 38 +- .../synthetic_monitoring_check.py | 2 - .../synthetic_monitoring_installation.py | 2 - .../synthetic_monitoring_probe.py | 2 - 96 files changed, 1523 insertions(+), 743 deletions(-) create mode 100644 sdk/dotnet/OnCall/UserNotificationRule.cs create mode 100644 sdk/go/grafana/oncall/userNotificationRule.go create mode 100644 sdk/nodejs/oncall/userNotificationRule.ts create mode 100644 sdk/python/pulumiverse_grafana/oncall/user_notification_rule.py diff --git a/provider/cmd/pulumi-resource-grafana/bridge-metadata.json b/provider/cmd/pulumi-resource-grafana/bridge-metadata.json index 27a0f5f9..c8f9f099 100644 --- a/provider/cmd/pulumi-resource-grafana/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-grafana/bridge-metadata.json @@ -674,7 +674,14 @@ } }, "grafana_oncall_user_notification_rule": { - "current": "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule" + "current": "grafana:onCall/userNotificationRule:UserNotificationRule", + "past": [ + { + "name": "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule", + "inCodegen": true, + "majorVersion": 0 + } + ] }, "grafana_organization": { "current": "grafana:oss/organization:Organization", @@ -1847,6 +1854,11 @@ "grafana:index/oncallSchedule:OncallSchedule" ] }, + "grafana_oncall_user_notification_rule": { + "aliases": [ + "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule" + ] + }, "grafana_organization": { "aliases": [ "grafana:index/organization:Organization" @@ -2182,6 +2194,7 @@ "grafana:onCall/outgoingWebhook:OutgoingWebhook": 0, "grafana:onCall/route:Route": 0, "grafana:onCall/schedule:Schedule": 0, + "grafana:onCall/userNotificationRule:UserNotificationRule": 1, "grafana:oss/annotation:Annotation": 0, "grafana:oss/dashboard:Dashboard": 0, "grafana:oss/dashboardPermission:DashboardPermission": 0, diff --git a/provider/cmd/pulumi-resource-grafana/schema.json b/provider/cmd/pulumi-resource-grafana/schema.json index 888d4a92..1a3d5529 100644 --- a/provider/cmd/pulumi-resource-grafana/schema.json +++ b/provider/cmd/pulumi-resource-grafana/schema.json @@ -11760,11 +11760,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudAccessPolicy:CloudAccessPolicy" - } - ], "deprecationMessage": "grafana.index/cloudaccesspolicy.CloudAccessPolicy has been deprecated in favor of grafana.cloud/accesspolicy.AccessPolicy" }, "grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken": { @@ -11883,11 +11878,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken" - } - ], "deprecationMessage": "grafana.index/cloudaccesspolicytoken.CloudAccessPolicyToken has been deprecated in favor of grafana.cloud/accesspolicytoken.AccessPolicyToken" }, "grafana:index/cloudOrgMember:CloudOrgMember": { @@ -11961,11 +11951,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudOrgMember:CloudOrgMember" - } - ], "deprecationMessage": "grafana.index/cloudorgmember.CloudOrgMember has been deprecated in favor of grafana.cloud/orgmember.OrgMember" }, "grafana:index/cloudPluginInstallation:CloudPluginInstallation": { @@ -12032,11 +12017,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudPluginInstallation:CloudPluginInstallation" - } - ], "deprecationMessage": "grafana.index/cloudplugininstallation.CloudPluginInstallation has been deprecated in favor of grafana.cloud/plugininstallation.PluginInstallation" }, "grafana:index/cloudStack:CloudStack": { @@ -12423,11 +12403,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudStack:CloudStack" - } - ], "deprecationMessage": "grafana.index/cloudstack.CloudStack has been deprecated in favor of grafana.cloud/stack.Stack" }, "grafana:index/cloudStackServiceAccount:CloudStackServiceAccount": { @@ -12504,11 +12479,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudStackServiceAccount:CloudStackServiceAccount" - } - ], "deprecationMessage": "grafana.index/cloudstackserviceaccount.CloudStackServiceAccount has been deprecated in favor of grafana.cloud/stackserviceaccount.StackServiceAccount" }, "grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken": { @@ -12599,11 +12569,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken" - } - ], "deprecationMessage": "grafana.index/cloudstackserviceaccounttoken.CloudStackServiceAccountToken has been deprecated in favor of grafana.cloud/stackserviceaccounttoken.StackServiceAccountToken" }, "grafana:index/contactPoint:ContactPoint": { @@ -14542,11 +14507,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/machineLearningHoliday:MachineLearningHoliday" - } - ], "deprecationMessage": "grafana.index/machinelearningholiday.MachineLearningHoliday has been deprecated in favor of grafana.machinelearning/holiday.Holiday" }, "grafana:index/machineLearningJob:MachineLearningJob": { @@ -14742,11 +14702,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/machineLearningJob:MachineLearningJob" - } - ], "deprecationMessage": "grafana.index/machinelearningjob.MachineLearningJob has been deprecated in favor of grafana.machinelearning/job.Job" }, "grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector": { @@ -14881,11 +14836,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector" - } - ], "deprecationMessage": "grafana.index/machinelearningoutlierdetector.MachineLearningOutlierDetector has been deprecated in favor of grafana.machinelearning/outlierdetector.OutlierDetector" }, "grafana:index/messageTemplate:MessageTemplate": { @@ -15385,11 +15335,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallEscalation:OncallEscalation" - } - ], "deprecationMessage": "grafana.index/oncallescalation.OncallEscalation has been deprecated in favor of grafana.oncall/escalation.Escalation" }, "grafana:index/oncallEscalationChain:OncallEscalationChain": { @@ -15431,11 +15376,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallEscalationChain:OncallEscalationChain" - } - ], "deprecationMessage": "grafana.index/oncallescalationchain.OncallEscalationChain has been deprecated in favor of grafana.oncall/escalationchain.EscalationChain" }, "grafana:index/oncallIntegration:OncallIntegration": { @@ -15530,11 +15470,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallIntegration:OncallIntegration" - } - ], "deprecationMessage": "grafana.index/oncallintegration.OncallIntegration has been deprecated in favor of grafana.oncall/integration.Integration" }, "grafana:index/oncallOnCallShift:OncallOnCallShift": { @@ -15806,11 +15741,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallOnCallShift:OncallOnCallShift" - } - ], "deprecationMessage": "grafana.index/oncalloncallshift.OncallOnCallShift has been deprecated in favor of grafana.oncall/oncallshift.OnCallShift" }, "grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook": { @@ -16015,11 +15945,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook" - } - ], "deprecationMessage": "grafana.index/oncalloutgoingwebhook.OncallOutgoingWebhook has been deprecated in favor of grafana.oncall/outgoingwebhook.OutgoingWebhook" }, "grafana:index/oncallRoute:OncallRoute": { @@ -16144,11 +16069,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallRoute:OncallRoute" - } - ], "deprecationMessage": "grafana.index/oncallroute.OncallRoute has been deprecated in favor of grafana.oncall/route.Route" }, "grafana:index/oncallSchedule:OncallSchedule": { @@ -16289,15 +16209,10 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/oncallSchedule:OncallSchedule" - } - ], "deprecationMessage": "grafana.index/oncallschedule.OncallSchedule has been deprecated in favor of grafana.oncall/schedule.Schedule" }, "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule": { - "description": "* [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/)\n\n**Note**: you must be running Grafana OnCall \u003e= v1.8.0 to use this resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as grafana from \"@pulumi/grafana\";\nimport * as grafana from \"@pulumiverse/grafana\";\n\nconst myUser = grafana.onCall.getUser({\n username: \"my_username\",\n});\nconst myUserStep1 = new grafana.OncallUserNotificationRule(\"my_user_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 0,\n type: \"notify_by_mobile_app\",\n});\nconst myUserStep2 = new grafana.OncallUserNotificationRule(\"my_user_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 1,\n duration: 600,\n type: \"wait\",\n});\nconst myUserStep3 = new grafana.OncallUserNotificationRule(\"my_user_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 2,\n type: \"notify_by_phone_call\",\n});\nconst myUserStep4 = new grafana.OncallUserNotificationRule(\"my_user_step_4\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 3,\n duration: 300,\n type: \"wait\",\n});\nconst myUserStep5 = new grafana.OncallUserNotificationRule(\"my_user_step_5\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 4,\n type: \"notify_by_slack\",\n});\nconst myUserImportantStep1 = new grafana.OncallUserNotificationRule(\"my_user_important_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 0,\n type: \"notify_by_mobile_app_critical\",\n});\nconst myUserImportantStep2 = new grafana.OncallUserNotificationRule(\"my_user_important_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 1,\n duration: 300,\n type: \"wait\",\n});\nconst myUserImportantStep3 = new grafana.OncallUserNotificationRule(\"my_user_important_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 2,\n type: \"notify_by_mobile_app_critical\",\n});\n```\n```python\nimport pulumi\nimport pulumi_grafana as grafana\nimport pulumiverse_grafana as grafana\n\nmy_user = grafana.onCall.get_user(username=\"my_username\")\nmy_user_step1 = grafana.OncallUserNotificationRule(\"my_user_step_1\",\n user_id=my_user.id,\n position=0,\n type=\"notify_by_mobile_app\")\nmy_user_step2 = grafana.OncallUserNotificationRule(\"my_user_step_2\",\n user_id=my_user.id,\n position=1,\n duration=600,\n type=\"wait\")\nmy_user_step3 = grafana.OncallUserNotificationRule(\"my_user_step_3\",\n user_id=my_user.id,\n position=2,\n type=\"notify_by_phone_call\")\nmy_user_step4 = grafana.OncallUserNotificationRule(\"my_user_step_4\",\n user_id=my_user.id,\n position=3,\n duration=300,\n type=\"wait\")\nmy_user_step5 = grafana.OncallUserNotificationRule(\"my_user_step_5\",\n user_id=my_user.id,\n position=4,\n type=\"notify_by_slack\")\nmy_user_important_step1 = grafana.OncallUserNotificationRule(\"my_user_important_step_1\",\n user_id=my_user.id,\n important=True,\n position=0,\n type=\"notify_by_mobile_app_critical\")\nmy_user_important_step2 = grafana.OncallUserNotificationRule(\"my_user_important_step_2\",\n user_id=my_user.id,\n important=True,\n position=1,\n duration=300,\n type=\"wait\")\nmy_user_important_step3 = grafana.OncallUserNotificationRule(\"my_user_important_step_3\",\n user_id=my_user.id,\n important=True,\n position=2,\n type=\"notify_by_mobile_app_critical\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Grafana = Pulumi.Grafana;\nusing Grafana = Pulumiverse.Grafana;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myUser = Grafana.OnCall.GetUser.Invoke(new()\n {\n Username = \"my_username\",\n });\n\n var myUserStep1 = new Grafana.OncallUserNotificationRule(\"my_user_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 0,\n Type = \"notify_by_mobile_app\",\n });\n\n var myUserStep2 = new Grafana.OncallUserNotificationRule(\"my_user_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 1,\n Duration = 600,\n Type = \"wait\",\n });\n\n var myUserStep3 = new Grafana.OncallUserNotificationRule(\"my_user_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 2,\n Type = \"notify_by_phone_call\",\n });\n\n var myUserStep4 = new Grafana.OncallUserNotificationRule(\"my_user_step_4\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 3,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserStep5 = new Grafana.OncallUserNotificationRule(\"my_user_step_5\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 4,\n Type = \"notify_by_slack\",\n });\n\n var myUserImportantStep1 = new Grafana.OncallUserNotificationRule(\"my_user_important_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 0,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n var myUserImportantStep2 = new Grafana.OncallUserNotificationRule(\"my_user_important_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 1,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserImportantStep3 = new Grafana.OncallUserNotificationRule(\"my_user_important_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 2,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/onCall\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmyUser, err := onCall.GetUser(ctx, \u0026oncall.GetUserArgs{\n\t\t\tUsername: \"my_username\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_step_1\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_step_2\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(600),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_step_3\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_phone_call\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_step_4\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(3),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_step_5\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(4),\n\t\t\tType: pulumi.String(\"notify_by_slack\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_important_step_1\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_important_step_2\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = grafana.NewOncallUserNotificationRule(ctx, \"my_user_important_step_3\", \u0026grafana.OncallUserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.grafana.onCall.OnCallFunctions;\nimport com.pulumi.grafana.onCall.inputs.GetUserArgs;\nimport com.pulumi.grafana.OncallUserNotificationRule;\nimport com.pulumi.grafana.OncallUserNotificationRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var myUser = OnCallFunctions.getUser(GetUserArgs.builder()\n .username(\"my_username\")\n .build());\n\n var myUserStep1 = new OncallUserNotificationRule(\"myUserStep1\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(0)\n .type(\"notify_by_mobile_app\")\n .build());\n\n var myUserStep2 = new OncallUserNotificationRule(\"myUserStep2\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(1)\n .duration(600)\n .type(\"wait\")\n .build());\n\n var myUserStep3 = new OncallUserNotificationRule(\"myUserStep3\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(2)\n .type(\"notify_by_phone_call\")\n .build());\n\n var myUserStep4 = new OncallUserNotificationRule(\"myUserStep4\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(3)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserStep5 = new OncallUserNotificationRule(\"myUserStep5\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(4)\n .type(\"notify_by_slack\")\n .build());\n\n var myUserImportantStep1 = new OncallUserNotificationRule(\"myUserImportantStep1\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(0)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n var myUserImportantStep2 = new OncallUserNotificationRule(\"myUserImportantStep2\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(1)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserImportantStep3 = new OncallUserNotificationRule(\"myUserImportantStep3\", OncallUserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(2)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n myUserStep1:\n type: grafana:OncallUserNotificationRule\n name: my_user_step_1\n properties:\n userId: ${myUser.id}\n position: 0\n type: notify_by_mobile_app\n myUserStep2:\n type: grafana:OncallUserNotificationRule\n name: my_user_step_2\n properties:\n userId: ${myUser.id}\n position: 1\n duration: 600 # 10 minutes\n type: wait\n myUserStep3:\n type: grafana:OncallUserNotificationRule\n name: my_user_step_3\n properties:\n userId: ${myUser.id}\n position: 2\n type: notify_by_phone_call\n myUserStep4:\n type: grafana:OncallUserNotificationRule\n name: my_user_step_4\n properties:\n userId: ${myUser.id}\n position: 3\n duration: 300 # 5 minutes\n type: wait\n myUserStep5:\n type: grafana:OncallUserNotificationRule\n name: my_user_step_5\n properties:\n userId: ${myUser.id}\n position: 4\n type: notify_by_slack\n myUserImportantStep1:\n type: grafana:OncallUserNotificationRule\n name: my_user_important_step_1\n properties:\n userId: ${myUser.id}\n important: true\n position: 0\n type: notify_by_mobile_app_critical\n myUserImportantStep2:\n type: grafana:OncallUserNotificationRule\n name: my_user_important_step_2\n properties:\n userId: ${myUser.id}\n important: true\n position: 1\n duration: 300 # 5 minutes\n type: wait\n myUserImportantStep3:\n type: grafana:OncallUserNotificationRule\n name: my_user_important_step_3\n properties:\n userId: ${myUser.id}\n important: true\n position: 2\n type: notify_by_mobile_app_critical\nvariables:\n myUser:\n fn::invoke:\n Function: grafana:onCall:getUser\n Arguments:\n username: my_username\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import grafana:index/oncallUserNotificationRule:OncallUserNotificationRule name \"{{ id }}\"\n```\n\n", + "description": "* [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/)\n\n**Note**: you must be running Grafana OnCall \u003e= v1.8.0 to use this resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as grafana from \"@pulumi/grafana\";\nimport * as grafana from \"@pulumiverse/grafana\";\n\nconst myUser = grafana.onCall.getUser({\n username: \"my_username\",\n});\nconst myUserStep1 = new grafana.oncall.UserNotificationRule(\"my_user_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 0,\n type: \"notify_by_mobile_app\",\n});\nconst myUserStep2 = new grafana.oncall.UserNotificationRule(\"my_user_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 1,\n duration: 600,\n type: \"wait\",\n});\nconst myUserStep3 = new grafana.oncall.UserNotificationRule(\"my_user_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 2,\n type: \"notify_by_phone_call\",\n});\nconst myUserStep4 = new grafana.oncall.UserNotificationRule(\"my_user_step_4\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 3,\n duration: 300,\n type: \"wait\",\n});\nconst myUserStep5 = new grafana.oncall.UserNotificationRule(\"my_user_step_5\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 4,\n type: \"notify_by_slack\",\n});\nconst myUserImportantStep1 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 0,\n type: \"notify_by_mobile_app_critical\",\n});\nconst myUserImportantStep2 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 1,\n duration: 300,\n type: \"wait\",\n});\nconst myUserImportantStep3 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 2,\n type: \"notify_by_mobile_app_critical\",\n});\n```\n```python\nimport pulumi\nimport pulumi_grafana as grafana\nimport pulumiverse_grafana as grafana\n\nmy_user = grafana.onCall.get_user(username=\"my_username\")\nmy_user_step1 = grafana.on_call.UserNotificationRule(\"my_user_step_1\",\n user_id=my_user.id,\n position=0,\n type=\"notify_by_mobile_app\")\nmy_user_step2 = grafana.on_call.UserNotificationRule(\"my_user_step_2\",\n user_id=my_user.id,\n position=1,\n duration=600,\n type=\"wait\")\nmy_user_step3 = grafana.on_call.UserNotificationRule(\"my_user_step_3\",\n user_id=my_user.id,\n position=2,\n type=\"notify_by_phone_call\")\nmy_user_step4 = grafana.on_call.UserNotificationRule(\"my_user_step_4\",\n user_id=my_user.id,\n position=3,\n duration=300,\n type=\"wait\")\nmy_user_step5 = grafana.on_call.UserNotificationRule(\"my_user_step_5\",\n user_id=my_user.id,\n position=4,\n type=\"notify_by_slack\")\nmy_user_important_step1 = grafana.on_call.UserNotificationRule(\"my_user_important_step_1\",\n user_id=my_user.id,\n important=True,\n position=0,\n type=\"notify_by_mobile_app_critical\")\nmy_user_important_step2 = grafana.on_call.UserNotificationRule(\"my_user_important_step_2\",\n user_id=my_user.id,\n important=True,\n position=1,\n duration=300,\n type=\"wait\")\nmy_user_important_step3 = grafana.on_call.UserNotificationRule(\"my_user_important_step_3\",\n user_id=my_user.id,\n important=True,\n position=2,\n type=\"notify_by_mobile_app_critical\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Grafana = Pulumi.Grafana;\nusing Grafana = Pulumiverse.Grafana;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myUser = Grafana.OnCall.GetUser.Invoke(new()\n {\n Username = \"my_username\",\n });\n\n var myUserStep1 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 0,\n Type = \"notify_by_mobile_app\",\n });\n\n var myUserStep2 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 1,\n Duration = 600,\n Type = \"wait\",\n });\n\n var myUserStep3 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 2,\n Type = \"notify_by_phone_call\",\n });\n\n var myUserStep4 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_4\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 3,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserStep5 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_5\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 4,\n Type = \"notify_by_slack\",\n });\n\n var myUserImportantStep1 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 0,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n var myUserImportantStep2 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 1,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserImportantStep3 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 2,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/onCall\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmyUser, err := onCall.GetUser(ctx, \u0026oncall.GetUserArgs{\n\t\t\tUsername: \"my_username\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_1\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_2\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(600),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_3\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_phone_call\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_4\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(3),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_5\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(4),\n\t\t\tType: pulumi.String(\"notify_by_slack\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_1\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_2\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_3\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.grafana.onCall.OnCallFunctions;\nimport com.pulumi.grafana.onCall.inputs.GetUserArgs;\nimport com.pulumi.grafana.onCall.UserNotificationRule;\nimport com.pulumi.grafana.onCall.UserNotificationRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var myUser = OnCallFunctions.getUser(GetUserArgs.builder()\n .username(\"my_username\")\n .build());\n\n var myUserStep1 = new UserNotificationRule(\"myUserStep1\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(0)\n .type(\"notify_by_mobile_app\")\n .build());\n\n var myUserStep2 = new UserNotificationRule(\"myUserStep2\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(1)\n .duration(600)\n .type(\"wait\")\n .build());\n\n var myUserStep3 = new UserNotificationRule(\"myUserStep3\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(2)\n .type(\"notify_by_phone_call\")\n .build());\n\n var myUserStep4 = new UserNotificationRule(\"myUserStep4\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(3)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserStep5 = new UserNotificationRule(\"myUserStep5\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(4)\n .type(\"notify_by_slack\")\n .build());\n\n var myUserImportantStep1 = new UserNotificationRule(\"myUserImportantStep1\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(0)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n var myUserImportantStep2 = new UserNotificationRule(\"myUserImportantStep2\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(1)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserImportantStep3 = new UserNotificationRule(\"myUserImportantStep3\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(2)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n myUserStep1:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_1\n properties:\n userId: ${myUser.id}\n position: 0\n type: notify_by_mobile_app\n myUserStep2:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_2\n properties:\n userId: ${myUser.id}\n position: 1\n duration: 600 # 10 minutes\n type: wait\n myUserStep3:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_3\n properties:\n userId: ${myUser.id}\n position: 2\n type: notify_by_phone_call\n myUserStep4:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_4\n properties:\n userId: ${myUser.id}\n position: 3\n duration: 300 # 5 minutes\n type: wait\n myUserStep5:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_5\n properties:\n userId: ${myUser.id}\n position: 4\n type: notify_by_slack\n myUserImportantStep1:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_1\n properties:\n userId: ${myUser.id}\n important: true\n position: 0\n type: notify_by_mobile_app_critical\n myUserImportantStep2:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_2\n properties:\n userId: ${myUser.id}\n important: true\n position: 1\n duration: 300 # 5 minutes\n type: wait\n myUserImportantStep3:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_3\n properties:\n userId: ${myUser.id}\n important: true\n position: 2\n type: notify_by_mobile_app_critical\nvariables:\n myUser:\n fn::invoke:\n Function: grafana:onCall:getUser\n Arguments:\n username: my_username\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import grafana:index/oncallUserNotificationRule:OncallUserNotificationRule name \"{{ id }}\"\n```\n\n", "properties": { "duration": { "type": "integer", @@ -16376,7 +16291,8 @@ } }, "type": "object" - } + }, + "deprecationMessage": "grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule" }, "grafana:index/organization:Organization": { "description": "* [Official documentation](https://grafana.com/docs/grafana/latest/administration/organization-management/)\n* [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/org/)\n\nThis resource represents an instance-scoped resource and uses Grafana's admin APIs.\nIt does not work with API tokens or service accounts which are org-scoped.\nYou must use basic auth.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as grafana from \"@pulumiverse/grafana\";\n\nconst test = new grafana.oss.Organization(\"test\", {\n name: \"Test Organization\",\n adminUser: \"admin\",\n createUsers: true,\n admins: [\"admin@example.com\"],\n editors: [\n \"editor-01@example.com\",\n \"editor-02@example.com\",\n ],\n viewers: [\n \"viewer-01@example.com\",\n \"viewer-02@example.com\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumiverse_grafana as grafana\n\ntest = grafana.oss.Organization(\"test\",\n name=\"Test Organization\",\n admin_user=\"admin\",\n create_users=True,\n admins=[\"admin@example.com\"],\n editors=[\n \"editor-01@example.com\",\n \"editor-02@example.com\",\n ],\n viewers=[\n \"viewer-01@example.com\",\n \"viewer-02@example.com\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Grafana = Pulumiverse.Grafana;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Grafana.Oss.Organization(\"test\", new()\n {\n Name = \"Test Organization\",\n AdminUser = \"admin\",\n CreateUsers = true,\n Admins = new[]\n {\n \"admin@example.com\",\n },\n Editors = new[]\n {\n \"editor-01@example.com\",\n \"editor-02@example.com\",\n },\n Viewers = new[]\n {\n \"viewer-01@example.com\",\n \"viewer-02@example.com\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oss.NewOrganization(ctx, \"test\", \u0026oss.OrganizationArgs{\n\t\t\tName: pulumi.String(\"Test Organization\"),\n\t\t\tAdminUser: pulumi.String(\"admin\"),\n\t\t\tCreateUsers: pulumi.Bool(true),\n\t\t\tAdmins: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"admin@example.com\"),\n\t\t\t},\n\t\t\tEditors: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"editor-01@example.com\"),\n\t\t\t\tpulumi.String(\"editor-02@example.com\"),\n\t\t\t},\n\t\t\tViewers: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"viewer-01@example.com\"),\n\t\t\t\tpulumi.String(\"viewer-02@example.com\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.grafana.oss.Organization;\nimport com.pulumi.grafana.oss.OrganizationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Organization(\"test\", OrganizationArgs.builder()\n .name(\"Test Organization\")\n .adminUser(\"admin\")\n .createUsers(true)\n .admins(\"admin@example.com\")\n .editors( \n \"editor-01@example.com\",\n \"editor-02@example.com\")\n .viewers( \n \"viewer-01@example.com\",\n \"viewer-02@example.com\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: grafana:oss:Organization\n properties:\n name: Test Organization\n adminUser: admin\n createUsers: true\n admins:\n - admin@example.com\n editors:\n - editor-01@example.com\n - editor-02@example.com\n viewers:\n - viewer-01@example.com\n - viewer-02@example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import grafana:index/organization:Organization name \"{{ id }}\"\n```\n\n", @@ -18106,11 +18022,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck" - } - ], "deprecationMessage": "grafana.index/syntheticmonitoringcheck.SyntheticMonitoringCheck has been deprecated in favor of grafana.syntheticmonitoring/check.Check" }, "grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation": { @@ -18188,11 +18099,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation" - } - ], "deprecationMessage": "grafana.index/syntheticmonitoringinstallation.SyntheticMonitoringInstallation has been deprecated in favor of grafana.syntheticmonitoring/installation.Installation" }, "grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe": { @@ -18331,11 +18237,6 @@ }, "type": "object" }, - "aliases": [ - { - "type": "grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe" - } - ], "deprecationMessage": "grafana.index/syntheticmonitoringprobe.SyntheticMonitoringProbe has been deprecated in favor of grafana.syntheticmonitoring/probe.Probe" }, "grafana:index/team:Team": { @@ -20149,6 +20050,93 @@ } ] }, + "grafana:onCall/userNotificationRule:UserNotificationRule": { + "description": "* [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/)\n\n**Note**: you must be running Grafana OnCall \u003e= v1.8.0 to use this resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as grafana from \"@pulumi/grafana\";\nimport * as grafana from \"@pulumiverse/grafana\";\n\nconst myUser = grafana.onCall.getUser({\n username: \"my_username\",\n});\nconst myUserStep1 = new grafana.oncall.UserNotificationRule(\"my_user_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 0,\n type: \"notify_by_mobile_app\",\n});\nconst myUserStep2 = new grafana.oncall.UserNotificationRule(\"my_user_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 1,\n duration: 600,\n type: \"wait\",\n});\nconst myUserStep3 = new grafana.oncall.UserNotificationRule(\"my_user_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 2,\n type: \"notify_by_phone_call\",\n});\nconst myUserStep4 = new grafana.oncall.UserNotificationRule(\"my_user_step_4\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 3,\n duration: 300,\n type: \"wait\",\n});\nconst myUserStep5 = new grafana.oncall.UserNotificationRule(\"my_user_step_5\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n position: 4,\n type: \"notify_by_slack\",\n});\nconst myUserImportantStep1 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_1\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 0,\n type: \"notify_by_mobile_app_critical\",\n});\nconst myUserImportantStep2 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_2\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 1,\n duration: 300,\n type: \"wait\",\n});\nconst myUserImportantStep3 = new grafana.oncall.UserNotificationRule(\"my_user_important_step_3\", {\n userId: myUser.then(myUser =\u003e myUser.id),\n important: true,\n position: 2,\n type: \"notify_by_mobile_app_critical\",\n});\n```\n```python\nimport pulumi\nimport pulumi_grafana as grafana\nimport pulumiverse_grafana as grafana\n\nmy_user = grafana.onCall.get_user(username=\"my_username\")\nmy_user_step1 = grafana.on_call.UserNotificationRule(\"my_user_step_1\",\n user_id=my_user.id,\n position=0,\n type=\"notify_by_mobile_app\")\nmy_user_step2 = grafana.on_call.UserNotificationRule(\"my_user_step_2\",\n user_id=my_user.id,\n position=1,\n duration=600,\n type=\"wait\")\nmy_user_step3 = grafana.on_call.UserNotificationRule(\"my_user_step_3\",\n user_id=my_user.id,\n position=2,\n type=\"notify_by_phone_call\")\nmy_user_step4 = grafana.on_call.UserNotificationRule(\"my_user_step_4\",\n user_id=my_user.id,\n position=3,\n duration=300,\n type=\"wait\")\nmy_user_step5 = grafana.on_call.UserNotificationRule(\"my_user_step_5\",\n user_id=my_user.id,\n position=4,\n type=\"notify_by_slack\")\nmy_user_important_step1 = grafana.on_call.UserNotificationRule(\"my_user_important_step_1\",\n user_id=my_user.id,\n important=True,\n position=0,\n type=\"notify_by_mobile_app_critical\")\nmy_user_important_step2 = grafana.on_call.UserNotificationRule(\"my_user_important_step_2\",\n user_id=my_user.id,\n important=True,\n position=1,\n duration=300,\n type=\"wait\")\nmy_user_important_step3 = grafana.on_call.UserNotificationRule(\"my_user_important_step_3\",\n user_id=my_user.id,\n important=True,\n position=2,\n type=\"notify_by_mobile_app_critical\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Grafana = Pulumi.Grafana;\nusing Grafana = Pulumiverse.Grafana;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myUser = Grafana.OnCall.GetUser.Invoke(new()\n {\n Username = \"my_username\",\n });\n\n var myUserStep1 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 0,\n Type = \"notify_by_mobile_app\",\n });\n\n var myUserStep2 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 1,\n Duration = 600,\n Type = \"wait\",\n });\n\n var myUserStep3 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 2,\n Type = \"notify_by_phone_call\",\n });\n\n var myUserStep4 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_4\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 3,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserStep5 = new Grafana.OnCall.UserNotificationRule(\"my_user_step_5\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Position = 4,\n Type = \"notify_by_slack\",\n });\n\n var myUserImportantStep1 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_1\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 0,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n var myUserImportantStep2 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_2\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 1,\n Duration = 300,\n Type = \"wait\",\n });\n\n var myUserImportantStep3 = new Grafana.OnCall.UserNotificationRule(\"my_user_important_step_3\", new()\n {\n UserId = myUser.Apply(getUserResult =\u003e getUserResult.Id),\n Important = true,\n Position = 2,\n Type = \"notify_by_mobile_app_critical\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/onCall\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmyUser, err := onCall.GetUser(ctx, \u0026oncall.GetUserArgs{\n\t\t\tUsername: \"my_username\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_1\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_2\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(600),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_3\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_phone_call\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_4\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(3),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_step_5\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tPosition: pulumi.Int(4),\n\t\t\tType: pulumi.String(\"notify_by_slack\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_1\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(0),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_2\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(1),\n\t\t\tDuration: pulumi.Int(300),\n\t\t\tType: pulumi.String(\"wait\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = onCall.NewUserNotificationRule(ctx, \"my_user_important_step_3\", \u0026onCall.UserNotificationRuleArgs{\n\t\t\tUserId: pulumi.String(myUser.Id),\n\t\t\tImportant: pulumi.Bool(true),\n\t\t\tPosition: pulumi.Int(2),\n\t\t\tType: pulumi.String(\"notify_by_mobile_app_critical\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.grafana.onCall.OnCallFunctions;\nimport com.pulumi.grafana.onCall.inputs.GetUserArgs;\nimport com.pulumi.grafana.onCall.UserNotificationRule;\nimport com.pulumi.grafana.onCall.UserNotificationRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var myUser = OnCallFunctions.getUser(GetUserArgs.builder()\n .username(\"my_username\")\n .build());\n\n var myUserStep1 = new UserNotificationRule(\"myUserStep1\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(0)\n .type(\"notify_by_mobile_app\")\n .build());\n\n var myUserStep2 = new UserNotificationRule(\"myUserStep2\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(1)\n .duration(600)\n .type(\"wait\")\n .build());\n\n var myUserStep3 = new UserNotificationRule(\"myUserStep3\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(2)\n .type(\"notify_by_phone_call\")\n .build());\n\n var myUserStep4 = new UserNotificationRule(\"myUserStep4\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(3)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserStep5 = new UserNotificationRule(\"myUserStep5\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .position(4)\n .type(\"notify_by_slack\")\n .build());\n\n var myUserImportantStep1 = new UserNotificationRule(\"myUserImportantStep1\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(0)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n var myUserImportantStep2 = new UserNotificationRule(\"myUserImportantStep2\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(1)\n .duration(300)\n .type(\"wait\")\n .build());\n\n var myUserImportantStep3 = new UserNotificationRule(\"myUserImportantStep3\", UserNotificationRuleArgs.builder()\n .userId(myUser.applyValue(getUserResult -\u003e getUserResult.id()))\n .important(true)\n .position(2)\n .type(\"notify_by_mobile_app_critical\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n myUserStep1:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_1\n properties:\n userId: ${myUser.id}\n position: 0\n type: notify_by_mobile_app\n myUserStep2:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_2\n properties:\n userId: ${myUser.id}\n position: 1\n duration: 600 # 10 minutes\n type: wait\n myUserStep3:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_3\n properties:\n userId: ${myUser.id}\n position: 2\n type: notify_by_phone_call\n myUserStep4:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_4\n properties:\n userId: ${myUser.id}\n position: 3\n duration: 300 # 5 minutes\n type: wait\n myUserStep5:\n type: grafana:onCall:UserNotificationRule\n name: my_user_step_5\n properties:\n userId: ${myUser.id}\n position: 4\n type: notify_by_slack\n myUserImportantStep1:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_1\n properties:\n userId: ${myUser.id}\n important: true\n position: 0\n type: notify_by_mobile_app_critical\n myUserImportantStep2:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_2\n properties:\n userId: ${myUser.id}\n important: true\n position: 1\n duration: 300 # 5 minutes\n type: wait\n myUserImportantStep3:\n type: grafana:onCall:UserNotificationRule\n name: my_user_important_step_3\n properties:\n userId: ${myUser.id}\n important: true\n position: 2\n type: notify_by_mobile_app_critical\nvariables:\n myUser:\n fn::invoke:\n Function: grafana:onCall:getUser\n Arguments:\n username: my_username\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name \"{{ id }}\"\n```\n\n", + "properties": { + "duration": { + "type": "integer", + "description": "A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600\n" + }, + "important": { + "type": "boolean", + "description": "Boolean value which indicates if a rule is “important”\n" + }, + "position": { + "type": "integer", + "description": "Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list.\n" + }, + "type": { + "type": "string", + "description": "The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers.\n" + }, + "userId": { + "type": "string", + "description": "User ID\n" + } + }, + "required": [ + "important", + "type", + "userId" + ], + "inputProperties": { + "duration": { + "type": "integer", + "description": "A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600\n" + }, + "important": { + "type": "boolean", + "description": "Boolean value which indicates if a rule is “important”\n" + }, + "position": { + "type": "integer", + "description": "Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list.\n" + }, + "type": { + "type": "string", + "description": "The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers.\n" + }, + "userId": { + "type": "string", + "description": "User ID\n" + } + }, + "requiredInputs": [ + "type", + "userId" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering UserNotificationRule resources.\n", + "properties": { + "duration": { + "type": "integer", + "description": "A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600\n" + }, + "important": { + "type": "boolean", + "description": "Boolean value which indicates if a rule is “important”\n" + }, + "position": { + "type": "integer", + "description": "Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list.\n" + }, + "type": { + "type": "string", + "description": "The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers.\n" + }, + "userId": { + "type": "string", + "description": "User ID\n" + } + }, + "type": "object" + }, + "aliases": [ + { + "type": "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule" + } + ] + }, "grafana:oss/annotation:Annotation": { "description": "* [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/)\n* [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/annotations/)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as grafana from \"@pulumiverse/grafana\";\n\nconst test = new grafana.oss.Annotation(\"test\", {text: \"basic text\"});\n```\n```python\nimport pulumi\nimport pulumiverse_grafana as grafana\n\ntest = grafana.oss.Annotation(\"test\", text=\"basic text\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Grafana = Pulumiverse.Grafana;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Grafana.Oss.Annotation(\"test\", new()\n {\n Text = \"basic text\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oss.NewAnnotation(ctx, \"test\", \u0026oss.AnnotationArgs{\n\t\t\tText: pulumi.String(\"basic text\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.grafana.oss.Annotation;\nimport com.pulumi.grafana.oss.AnnotationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Annotation(\"test\", AnnotationArgs.builder()\n .text(\"basic text\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: grafana:oss:Annotation\n properties:\n text: basic text\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n```sh\n$ pulumi import grafana:oss/annotation:Annotation name \"{{ id }}\"\n```\n\n```sh\n$ pulumi import grafana:oss/annotation:Annotation name \"{{ orgID }}:{{ id }}\"\n```\n\n", "properties": { diff --git a/provider/resources.go b/provider/resources.go index 4af5079a..a65f105c 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -260,85 +260,6 @@ func Provider() tfbridge.ProviderInfo { }, }, - // Cloud - "grafana_cloud_access_policy": { - Tok: grafanaResource(cloudMod, "AccessPolicy"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudAccessPolicy"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_access_policy.md", - }, - }, - "grafana_cloud_access_policy_token": { - Tok: grafanaResource(cloudMod, "AccessPolicyToken"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudAccessPolicyToken"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_access_policy_token.md", - }, - }, - "grafana_cloud_org_member": { - Tok: grafanaResource(cloudMod, "OrgMember"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudOrgMember"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_org_member.md", - }, - }, - "grafana_cloud_plugin_installation": { - Tok: grafanaResource(cloudMod, "PluginInstallation"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudPluginInstallation"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_plugin_installation.md", - }, - }, - "grafana_cloud_stack": { - Tok: grafanaResource(cloudMod, "Stack"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudStack"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_stack.md", - }, - }, - "grafana_cloud_stack_service_account": { - Tok: grafanaResource(cloudMod, "StackServiceAccount"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudStackServiceAccount"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_stack_service_account.md", - }, - }, - "grafana_cloud_stack_service_account_token": { - Tok: grafanaResource(cloudMod, "StackServiceAccountToken"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "CloudStackServiceAccountToken"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "cloud_stack_service_account_token.md", - }, - }, - // Enterprise "grafana_data_source_permission": { Tok: grafanaResource(enterpriseMod, "DataSourcePermission"), @@ -651,120 +572,6 @@ func Provider() tfbridge.ProviderInfo { }, }, - // Machine Learning - "grafana_machine_learning_holiday": { - Tok: grafanaResource(mlMod, "Holiday"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "MachineLearningHoliday"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "machine_learning_holiday.md", - }, - }, - "grafana_machine_learning_job": { - Tok: grafanaResource(mlMod, "Job"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "MachineLearningJob"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "machine_learning_job.md", - }, - }, - "grafana_machine_learning_outlier_detector": { - Tok: grafanaResource(mlMod, "OutlierDetector"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "MachineLearningOutlierDetector"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "machine_learning_outlier_detector.md", - }, - }, - - // OnCall - "grafana_oncall_escalation": { - Tok: grafanaResource(oncallMod, "Escalation"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallEscalation"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_escalation.md", - }, - }, - "grafana_oncall_escalation_chain": { - Tok: grafanaResource(oncallMod, "EscalationChain"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallEscalationChain"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_escalation_chain.md", - }, - }, - "grafana_oncall_integration": { - Tok: grafanaResource(oncallMod, "Integration"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallIntegration"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_integration.md", - }, - }, - "grafana_oncall_on_call_shift": { - Tok: grafanaResource(oncallMod, "OnCallShift"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallOnCallShift"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_on_call_shift.md", - }, - }, - "grafana_oncall_outgoing_webhook": { - Tok: grafanaResource(oncallMod, "OutgoingWebhook"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallOutgoingWebhook"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_outgoing_webhook.md", - }, - }, - "grafana_oncall_route": { - Tok: grafanaResource(oncallMod, "Route"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallRoute"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_route.md", - }, - }, - "grafana_oncall_schedule": { - Tok: grafanaResource(oncallMod, "Schedule"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "OncallSchedule"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "oncall_schedule.md", - }, - }, - // SLO "grafana_slo": { Tok: grafanaResource(sloMod, "SLO"), @@ -777,65 +584,8 @@ func Provider() tfbridge.ProviderInfo { Source: "slo.md", }, }, - - // Synthetic Monitoring - "grafana_synthetic_monitoring_check": { - Tok: grafanaResource(syntheticMonitoringMod, "Check"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "SyntheticMonitoringCheck"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "synthetic_monitoring_check.md", - }, - }, - "grafana_synthetic_monitoring_installation": { - Tok: grafanaResource(syntheticMonitoringMod, "Installation"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "SyntheticMonitoringInstallation"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "synthetic_monitoring_installation.md", - }, - }, - "grafana_synthetic_monitoring_probe": { - Tok: grafanaResource(syntheticMonitoringMod, "Probe"), - Aliases: []tfbridge.AliasInfo{ - { - Type: grafanaResourceAlias(grafanaMod, "SyntheticMonitoringProbe"), - }, - }, - Docs: &tfbridge.DocInfo{ - Source: "synthetic_monitoring_probe.md", - }, - }, }, DataSources: map[string]*tfbridge.DataSourceInfo{ - // Alerting - - // Cloud - "grafana_cloud_ips": { - Tok: grafanaDataSource(cloudMod, "getIps"), - Docs: &tfbridge.DocInfo{ - Source: "cloud_ips.md", - }, - }, - "grafana_cloud_organization": { - Tok: grafanaDataSource(cloudMod, "getOrganization"), - Docs: &tfbridge.DocInfo{ - Source: "cloud_organization.md", - }, - }, - "grafana_cloud_stack": { - Tok: grafanaDataSource(cloudMod, "getStack"), - Docs: &tfbridge.DocInfo{ - Source: "cloud_stack.md", - }, - }, - // Enterprise "grafana_role": { Tok: grafanaDataSource(enterpriseMod, "getRole"), @@ -918,58 +668,6 @@ func Provider() tfbridge.ProviderInfo { }, }, - // Machine Learning - - // OnCall - "grafana_oncall_escalation_chain": { - Tok: grafanaDataSource(oncallMod, "getEscalationChain"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_escalation_chain.md", - }, - }, - "grafana_oncall_integration": { - Tok: grafanaDataSource(oncallMod, "getIntegration"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_integration.md", - }, - }, - "grafana_oncall_outgoing_webhook": { - Tok: grafanaDataSource(oncallMod, "getOutgoingWebhook"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_outgoing_webhook.md", - }, - }, - "grafana_oncall_schedule": { - Tok: grafanaDataSource(oncallMod, "getSchedule"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_schedule.md", - }, - }, - "grafana_oncall_slack_channel": { - Tok: grafanaDataSource(oncallMod, "getSlackChannel"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_slack_channel.md", - }, - }, - "grafana_oncall_team": { - Tok: grafanaDataSource(oncallMod, "getTeam"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_team.md", - }, - }, - "grafana_oncall_user": { - Tok: grafanaDataSource(oncallMod, "getUser"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_user.md", - }, - }, - "grafana_oncall_user_group": { - Tok: grafanaDataSource(oncallMod, "getUserGroup"), - Docs: &tfbridge.DocInfo{ - Source: "oncall_user_group.md", - }, - }, - // SLO "grafana_slos": { Tok: grafanaDataSource(sloMod, "getSlos"), @@ -977,20 +675,6 @@ func Provider() tfbridge.ProviderInfo { Source: "slos.md", }, }, - - // Synthetic Monitoring - "grafana_synthetic_monitoring_probe": { - Tok: grafanaDataSource(syntheticMonitoringMod, "getProbe"), - Docs: &tfbridge.DocInfo{ - Source: "synthetic_monitoring_probe.md", - }, - }, - "grafana_synthetic_monitoring_probes": { - Tok: grafanaDataSource(syntheticMonitoringMod, "getProbes"), - Docs: &tfbridge.DocInfo{ - Source: "synthetic_monitoring_probes.md", - }, - }, }, JavaScript: &tfbridge.JavaScriptInfo{ PackageName: "@pulumiverse/grafana", @@ -1037,10 +721,24 @@ func Provider() tfbridge.ProviderInfo { MetadataInfo: tfbridge.NewProviderMetadata(metadata), } - prov.MustComputeTokens(tks.SingleModule("grafana_", grafanaMod, tks.MakeStandard(grafanaPkg))) - + prov.MustComputeTokens( + tks.MappedModules( + "grafana_", + "index", + map[string]string{ + "alerting": alertingMod, + "cloud": cloudMod, + "enterprise": enterpriseMod, + "machine_learning": mlMod, + "oncall": oncallMod, + "oss": ossMod, + "slo": sloMod, + "synthetic_monitoring": syntheticMonitoringMod, + }, + tks.MakeStandard(grafanaPkg), + ), + ) prov.SetAutonaming(255, "-") - prov.MustApplyAutoAliases() return prov diff --git a/sdk/dotnet/CloudAccessPolicy.cs b/sdk/dotnet/CloudAccessPolicy.cs index 9a8cce6c..ec59e2a9 100644 --- a/sdk/dotnet/CloudAccessPolicy.cs +++ b/sdk/dotnet/CloudAccessPolicy.cs @@ -154,10 +154,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudAccessPolicy:CloudAccessPolicy" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/CloudAccessPolicyToken.cs b/sdk/dotnet/CloudAccessPolicyToken.cs index c55a472d..7d845eed 100644 --- a/sdk/dotnet/CloudAccessPolicyToken.cs +++ b/sdk/dotnet/CloudAccessPolicyToken.cs @@ -154,10 +154,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken" }, - }, AdditionalSecretOutputs = { "token", diff --git a/sdk/dotnet/CloudOrgMember.cs b/sdk/dotnet/CloudOrgMember.cs index d93a8b36..bd0d3bcf 100644 --- a/sdk/dotnet/CloudOrgMember.cs +++ b/sdk/dotnet/CloudOrgMember.cs @@ -71,10 +71,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudOrgMember:CloudOrgMember" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/CloudPluginInstallation.cs b/sdk/dotnet/CloudPluginInstallation.cs index efa8f110..bd816977 100644 --- a/sdk/dotnet/CloudPluginInstallation.cs +++ b/sdk/dotnet/CloudPluginInstallation.cs @@ -93,10 +93,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudPluginInstallation:CloudPluginInstallation" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/CloudStack.cs b/sdk/dotnet/CloudStack.cs index 545fe7ee..6a686c89 100644 --- a/sdk/dotnet/CloudStack.cs +++ b/sdk/dotnet/CloudStack.cs @@ -269,10 +269,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudStack:CloudStack" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/CloudStackServiceAccount.cs b/sdk/dotnet/CloudStackServiceAccount.cs index db3f3e62..b50b5e47 100644 --- a/sdk/dotnet/CloudStackServiceAccount.cs +++ b/sdk/dotnet/CloudStackServiceAccount.cs @@ -98,10 +98,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudStackServiceAccount:CloudStackServiceAccount" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/CloudStackServiceAccountToken.cs b/sdk/dotnet/CloudStackServiceAccountToken.cs index 42580cff..51cfdc6d 100644 --- a/sdk/dotnet/CloudStackServiceAccountToken.cs +++ b/sdk/dotnet/CloudStackServiceAccountToken.cs @@ -101,10 +101,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken" }, - }, AdditionalSecretOutputs = { "key", diff --git a/sdk/dotnet/MachineLearningHoliday.cs b/sdk/dotnet/MachineLearningHoliday.cs index 0d59cd36..056bbc5b 100644 --- a/sdk/dotnet/MachineLearningHoliday.cs +++ b/sdk/dotnet/MachineLearningHoliday.cs @@ -79,10 +79,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/machineLearningHoliday:MachineLearningHoliday" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/MachineLearningJob.cs b/sdk/dotnet/MachineLearningJob.cs index 9a3aaf03..25dc2959 100644 --- a/sdk/dotnet/MachineLearningJob.cs +++ b/sdk/dotnet/MachineLearningJob.cs @@ -113,10 +113,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/machineLearningJob:MachineLearningJob" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/MachineLearningOutlierDetector.cs b/sdk/dotnet/MachineLearningOutlierDetector.cs index b29dc6e4..4d506eb8 100644 --- a/sdk/dotnet/MachineLearningOutlierDetector.cs +++ b/sdk/dotnet/MachineLearningOutlierDetector.cs @@ -99,10 +99,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OnCall/UserNotificationRule.cs b/sdk/dotnet/OnCall/UserNotificationRule.cs new file mode 100644 index 00000000..d66d3657 --- /dev/null +++ b/sdk/dotnet/OnCall/UserNotificationRule.cs @@ -0,0 +1,262 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Grafana.OnCall +{ + /// + /// * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/) + /// + /// **Note**: you must be running Grafana OnCall >= v1.8.0 to use this resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Grafana = Pulumi.Grafana; + /// using Grafana = Pulumiverse.Grafana; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var myUser = Grafana.OnCall.GetUser.Invoke(new() + /// { + /// Username = "my_username", + /// }); + /// + /// var myUserStep1 = new Grafana.OnCall.UserNotificationRule("my_user_step_1", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Position = 0, + /// Type = "notify_by_mobile_app", + /// }); + /// + /// var myUserStep2 = new Grafana.OnCall.UserNotificationRule("my_user_step_2", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Position = 1, + /// Duration = 600, + /// Type = "wait", + /// }); + /// + /// var myUserStep3 = new Grafana.OnCall.UserNotificationRule("my_user_step_3", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Position = 2, + /// Type = "notify_by_phone_call", + /// }); + /// + /// var myUserStep4 = new Grafana.OnCall.UserNotificationRule("my_user_step_4", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Position = 3, + /// Duration = 300, + /// Type = "wait", + /// }); + /// + /// var myUserStep5 = new Grafana.OnCall.UserNotificationRule("my_user_step_5", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Position = 4, + /// Type = "notify_by_slack", + /// }); + /// + /// var myUserImportantStep1 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_1", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Important = true, + /// Position = 0, + /// Type = "notify_by_mobile_app_critical", + /// }); + /// + /// var myUserImportantStep2 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_2", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Important = true, + /// Position = 1, + /// Duration = 300, + /// Type = "wait", + /// }); + /// + /// var myUserImportantStep3 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_3", new() + /// { + /// UserId = myUser.Apply(getUserResult => getUserResult.Id), + /// Important = true, + /// Position = 2, + /// Type = "notify_by_mobile_app_critical", + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// ```sh + /// $ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name "{{ id }}" + /// ``` + /// + [GrafanaResourceType("grafana:onCall/userNotificationRule:UserNotificationRule")] + public partial class UserNotificationRule : global::Pulumi.CustomResource + { + /// + /// A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + /// + [Output("duration")] + public Output Duration { get; private set; } = null!; + + /// + /// Boolean value which indicates if a rule is “important” + /// + [Output("important")] + public Output Important { get; private set; } = null!; + + /// + /// Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + /// + [Output("position")] + public Output Position { get; private set; } = null!; + + /// + /// The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + /// + /// User ID + /// + [Output("userId")] + public Output UserId { get; private set; } = null!; + + + /// + /// Create a UserNotificationRule resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public UserNotificationRule(string name, UserNotificationRuleArgs args, CustomResourceOptions? options = null) + : base("grafana:onCall/userNotificationRule:UserNotificationRule", name, args ?? new UserNotificationRuleArgs(), MakeResourceOptions(options, "")) + { + } + + private UserNotificationRule(string name, Input id, UserNotificationRuleState? state = null, CustomResourceOptions? options = null) + : base("grafana:onCall/userNotificationRule:UserNotificationRule", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + PluginDownloadURL = "github://api.github.com/pulumiverse", + Aliases = + { + new global::Pulumi.Alias { Type = "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule" }, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing UserNotificationRule resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static UserNotificationRule Get(string name, Input id, UserNotificationRuleState? state = null, CustomResourceOptions? options = null) + { + return new UserNotificationRule(name, id, state, options); + } + } + + public sealed class UserNotificationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + /// + [Input("duration")] + public Input? Duration { get; set; } + + /// + /// Boolean value which indicates if a rule is “important” + /// + [Input("important")] + public Input? Important { get; set; } + + /// + /// Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + /// + [Input("position")] + public Input? Position { get; set; } + + /// + /// The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + /// + [Input("type", required: true)] + public Input Type { get; set; } = null!; + + /// + /// User ID + /// + [Input("userId", required: true)] + public Input UserId { get; set; } = null!; + + public UserNotificationRuleArgs() + { + } + public static new UserNotificationRuleArgs Empty => new UserNotificationRuleArgs(); + } + + public sealed class UserNotificationRuleState : global::Pulumi.ResourceArgs + { + /// + /// A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + /// + [Input("duration")] + public Input? Duration { get; set; } + + /// + /// Boolean value which indicates if a rule is “important” + /// + [Input("important")] + public Input? Important { get; set; } + + /// + /// Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + /// + [Input("position")] + public Input? Position { get; set; } + + /// + /// The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + /// + [Input("type")] + public Input? Type { get; set; } + + /// + /// User ID + /// + [Input("userId")] + public Input? UserId { get; set; } + + public UserNotificationRuleState() + { + } + public static new UserNotificationRuleState Empty => new UserNotificationRuleState(); + } +} diff --git a/sdk/dotnet/OncallEscalation.cs b/sdk/dotnet/OncallEscalation.cs index c1534d12..69c0bd5b 100644 --- a/sdk/dotnet/OncallEscalation.cs +++ b/sdk/dotnet/OncallEscalation.cs @@ -126,10 +126,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallEscalation:OncallEscalation" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallEscalationChain.cs b/sdk/dotnet/OncallEscalationChain.cs index 4e799fd4..a5bf4c2c 100644 --- a/sdk/dotnet/OncallEscalationChain.cs +++ b/sdk/dotnet/OncallEscalationChain.cs @@ -77,10 +77,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallEscalationChain:OncallEscalationChain" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallIntegration.cs b/sdk/dotnet/OncallIntegration.cs index f60afbce..6a9b1864 100644 --- a/sdk/dotnet/OncallIntegration.cs +++ b/sdk/dotnet/OncallIntegration.cs @@ -125,10 +125,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallIntegration:OncallIntegration" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallOnCallShift.cs b/sdk/dotnet/OncallOnCallShift.cs index 10217373..4440ff48 100644 --- a/sdk/dotnet/OncallOnCallShift.cs +++ b/sdk/dotnet/OncallOnCallShift.cs @@ -143,10 +143,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallOnCallShift:OncallOnCallShift" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallOutgoingWebhook.cs b/sdk/dotnet/OncallOutgoingWebhook.cs index 2cfea884..79dc6a86 100644 --- a/sdk/dotnet/OncallOutgoingWebhook.cs +++ b/sdk/dotnet/OncallOutgoingWebhook.cs @@ -150,10 +150,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook" }, - }, AdditionalSecretOutputs = { "authorizationHeader", diff --git a/sdk/dotnet/OncallRoute.cs b/sdk/dotnet/OncallRoute.cs index 5c52636a..4c912875 100644 --- a/sdk/dotnet/OncallRoute.cs +++ b/sdk/dotnet/OncallRoute.cs @@ -149,10 +149,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallRoute:OncallRoute" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallSchedule.cs b/sdk/dotnet/OncallSchedule.cs index 9112b312..7ade9dc6 100644 --- a/sdk/dotnet/OncallSchedule.cs +++ b/sdk/dotnet/OncallSchedule.cs @@ -101,10 +101,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/oncallSchedule:OncallSchedule" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/OncallUserNotificationRule.cs b/sdk/dotnet/OncallUserNotificationRule.cs index 3617e1a9..4ad649cf 100644 --- a/sdk/dotnet/OncallUserNotificationRule.cs +++ b/sdk/dotnet/OncallUserNotificationRule.cs @@ -31,14 +31,14 @@ namespace Pulumiverse.Grafana /// Username = "my_username", /// }); /// - /// var myUserStep1 = new Grafana.OncallUserNotificationRule("my_user_step_1", new() + /// var myUserStep1 = new Grafana.OnCall.UserNotificationRule("my_user_step_1", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Position = 0, /// Type = "notify_by_mobile_app", /// }); /// - /// var myUserStep2 = new Grafana.OncallUserNotificationRule("my_user_step_2", new() + /// var myUserStep2 = new Grafana.OnCall.UserNotificationRule("my_user_step_2", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Position = 1, @@ -46,14 +46,14 @@ namespace Pulumiverse.Grafana /// Type = "wait", /// }); /// - /// var myUserStep3 = new Grafana.OncallUserNotificationRule("my_user_step_3", new() + /// var myUserStep3 = new Grafana.OnCall.UserNotificationRule("my_user_step_3", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Position = 2, /// Type = "notify_by_phone_call", /// }); /// - /// var myUserStep4 = new Grafana.OncallUserNotificationRule("my_user_step_4", new() + /// var myUserStep4 = new Grafana.OnCall.UserNotificationRule("my_user_step_4", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Position = 3, @@ -61,14 +61,14 @@ namespace Pulumiverse.Grafana /// Type = "wait", /// }); /// - /// var myUserStep5 = new Grafana.OncallUserNotificationRule("my_user_step_5", new() + /// var myUserStep5 = new Grafana.OnCall.UserNotificationRule("my_user_step_5", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Position = 4, /// Type = "notify_by_slack", /// }); /// - /// var myUserImportantStep1 = new Grafana.OncallUserNotificationRule("my_user_important_step_1", new() + /// var myUserImportantStep1 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_1", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Important = true, @@ -76,7 +76,7 @@ namespace Pulumiverse.Grafana /// Type = "notify_by_mobile_app_critical", /// }); /// - /// var myUserImportantStep2 = new Grafana.OncallUserNotificationRule("my_user_important_step_2", new() + /// var myUserImportantStep2 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_2", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Important = true, @@ -85,7 +85,7 @@ namespace Pulumiverse.Grafana /// Type = "wait", /// }); /// - /// var myUserImportantStep3 = new Grafana.OncallUserNotificationRule("my_user_important_step_3", new() + /// var myUserImportantStep3 = new Grafana.OnCall.UserNotificationRule("my_user_important_step_3", new() /// { /// UserId = myUser.Apply(getUserResult => getUserResult.Id), /// Important = true, @@ -102,6 +102,7 @@ namespace Pulumiverse.Grafana /// $ pulumi import grafana:index/oncallUserNotificationRule:OncallUserNotificationRule name "{{ id }}" /// ``` /// + [Obsolete(@"grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule")] [GrafanaResourceType("grafana:index/oncallUserNotificationRule:OncallUserNotificationRule")] public partial class OncallUserNotificationRule : global::Pulumi.CustomResource { diff --git a/sdk/dotnet/SyntheticMonitoringCheck.cs b/sdk/dotnet/SyntheticMonitoringCheck.cs index 7e353d67..37560e37 100644 --- a/sdk/dotnet/SyntheticMonitoringCheck.cs +++ b/sdk/dotnet/SyntheticMonitoringCheck.cs @@ -668,10 +668,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck" }, - }, }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/SyntheticMonitoringInstallation.cs b/sdk/dotnet/SyntheticMonitoringInstallation.cs index 4fb5a818..ccfcef13 100644 --- a/sdk/dotnet/SyntheticMonitoringInstallation.cs +++ b/sdk/dotnet/SyntheticMonitoringInstallation.cs @@ -139,10 +139,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation" }, - }, AdditionalSecretOutputs = { "metricsPublisherKey", diff --git a/sdk/dotnet/SyntheticMonitoringProbe.cs b/sdk/dotnet/SyntheticMonitoringProbe.cs index 55e93ada..f412a6a3 100644 --- a/sdk/dotnet/SyntheticMonitoringProbe.cs +++ b/sdk/dotnet/SyntheticMonitoringProbe.cs @@ -135,10 +135,6 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? { Version = Utilities.Version, PluginDownloadURL = "github://api.github.com/pulumiverse", - Aliases = - { - new global::Pulumi.Alias { Type = "grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe" }, - }, AdditionalSecretOutputs = { "authToken", diff --git a/sdk/go/grafana/cloudAccessPolicy.go b/sdk/go/grafana/cloudAccessPolicy.go index e27d20b2..7046bbec 100644 --- a/sdk/go/grafana/cloudAccessPolicy.go +++ b/sdk/go/grafana/cloudAccessPolicy.go @@ -123,12 +123,6 @@ func NewCloudAccessPolicy(ctx *pulumi.Context, if args.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudAccessPolicy:CloudAccessPolicy"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource CloudAccessPolicy err := ctx.RegisterResource("grafana:index/cloudAccessPolicy:CloudAccessPolicy", name, args, &resource, opts...) diff --git a/sdk/go/grafana/cloudAccessPolicyToken.go b/sdk/go/grafana/cloudAccessPolicyToken.go index d523b0a5..d012e9a8 100644 --- a/sdk/go/grafana/cloudAccessPolicyToken.go +++ b/sdk/go/grafana/cloudAccessPolicyToken.go @@ -120,12 +120,6 @@ func NewCloudAccessPolicyToken(ctx *pulumi.Context, if args.Region == nil { return nil, errors.New("invalid value for required argument 'Region'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken"), - }, - }) - opts = append(opts, aliases) secrets := pulumi.AdditionalSecretOutputs([]string{ "token", }) diff --git a/sdk/go/grafana/cloudOrgMember.go b/sdk/go/grafana/cloudOrgMember.go index 7a1a8301..6a5abe5e 100644 --- a/sdk/go/grafana/cloudOrgMember.go +++ b/sdk/go/grafana/cloudOrgMember.go @@ -50,12 +50,6 @@ func NewCloudOrgMember(ctx *pulumi.Context, if args.User == nil { return nil, errors.New("invalid value for required argument 'User'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudOrgMember:CloudOrgMember"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource CloudOrgMember err := ctx.RegisterResource("grafana:index/cloudOrgMember:CloudOrgMember", name, args, &resource, opts...) diff --git a/sdk/go/grafana/cloudPluginInstallation.go b/sdk/go/grafana/cloudPluginInstallation.go index 14e1b73e..abb9409a 100644 --- a/sdk/go/grafana/cloudPluginInstallation.go +++ b/sdk/go/grafana/cloudPluginInstallation.go @@ -84,12 +84,6 @@ func NewCloudPluginInstallation(ctx *pulumi.Context, if args.Version == nil { return nil, errors.New("invalid value for required argument 'Version'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudPluginInstallation:CloudPluginInstallation"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource CloudPluginInstallation err := ctx.RegisterResource("grafana:index/cloudPluginInstallation:CloudPluginInstallation", name, args, &resource, opts...) diff --git a/sdk/go/grafana/cloudStack.go b/sdk/go/grafana/cloudStack.go index 3b10b88f..1a873c3f 100644 --- a/sdk/go/grafana/cloudStack.go +++ b/sdk/go/grafana/cloudStack.go @@ -136,12 +136,6 @@ func NewCloudStack(ctx *pulumi.Context, if args.Slug == nil { return nil, errors.New("invalid value for required argument 'Slug'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudStack:CloudStack"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource CloudStack err := ctx.RegisterResource("grafana:index/cloudStack:CloudStack", name, args, &resource, opts...) diff --git a/sdk/go/grafana/cloudStackServiceAccount.go b/sdk/go/grafana/cloudStackServiceAccount.go index eb3ab795..d0c6977a 100644 --- a/sdk/go/grafana/cloudStackServiceAccount.go +++ b/sdk/go/grafana/cloudStackServiceAccount.go @@ -84,12 +84,6 @@ func NewCloudStackServiceAccount(ctx *pulumi.Context, if args.StackSlug == nil { return nil, errors.New("invalid value for required argument 'StackSlug'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudStackServiceAccount:CloudStackServiceAccount"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource CloudStackServiceAccount err := ctx.RegisterResource("grafana:index/cloudStackServiceAccount:CloudStackServiceAccount", name, args, &resource, opts...) diff --git a/sdk/go/grafana/cloudStackServiceAccountToken.go b/sdk/go/grafana/cloudStackServiceAccountToken.go index 58e123d9..d896f91e 100644 --- a/sdk/go/grafana/cloudStackServiceAccountToken.go +++ b/sdk/go/grafana/cloudStackServiceAccountToken.go @@ -85,12 +85,6 @@ func NewCloudStackServiceAccountToken(ctx *pulumi.Context, if args.StackSlug == nil { return nil, errors.New("invalid value for required argument 'StackSlug'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken"), - }, - }) - opts = append(opts, aliases) secrets := pulumi.AdditionalSecretOutputs([]string{ "key", }) diff --git a/sdk/go/grafana/machineLearningHoliday.go b/sdk/go/grafana/machineLearningHoliday.go index d3ebda3f..4e9a8407 100644 --- a/sdk/go/grafana/machineLearningHoliday.go +++ b/sdk/go/grafana/machineLearningHoliday.go @@ -44,12 +44,6 @@ func NewMachineLearningHoliday(ctx *pulumi.Context, args = &MachineLearningHolidayArgs{} } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/machineLearningHoliday:MachineLearningHoliday"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource MachineLearningHoliday err := ctx.RegisterResource("grafana:index/machineLearningHoliday:MachineLearningHoliday", name, args, &resource, opts...) diff --git a/sdk/go/grafana/machineLearningJob.go b/sdk/go/grafana/machineLearningJob.go index 4889098a..e0585cf2 100644 --- a/sdk/go/grafana/machineLearningJob.go +++ b/sdk/go/grafana/machineLearningJob.go @@ -67,12 +67,6 @@ func NewMachineLearningJob(ctx *pulumi.Context, if args.QueryParams == nil { return nil, errors.New("invalid value for required argument 'QueryParams'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/machineLearningJob:MachineLearningJob"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource MachineLearningJob err := ctx.RegisterResource("grafana:index/machineLearningJob:MachineLearningJob", name, args, &resource, opts...) diff --git a/sdk/go/grafana/machineLearningOutlierDetector.go b/sdk/go/grafana/machineLearningOutlierDetector.go index 3896a0e4..7631078b 100644 --- a/sdk/go/grafana/machineLearningOutlierDetector.go +++ b/sdk/go/grafana/machineLearningOutlierDetector.go @@ -68,12 +68,6 @@ func NewMachineLearningOutlierDetector(ctx *pulumi.Context, if args.QueryParams == nil { return nil, errors.New("invalid value for required argument 'QueryParams'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource MachineLearningOutlierDetector err := ctx.RegisterResource("grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncall/init.go b/sdk/go/grafana/oncall/init.go index 875ace1e..e04201b9 100644 --- a/sdk/go/grafana/oncall/init.go +++ b/sdk/go/grafana/oncall/init.go @@ -35,6 +35,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Route{} case "grafana:onCall/schedule:Schedule": r = &Schedule{} + case "grafana:onCall/userNotificationRule:UserNotificationRule": + r = &UserNotificationRule{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } @@ -83,4 +85,9 @@ func init() { "onCall/schedule", &module{version}, ) + pulumi.RegisterResourceModule( + "grafana", + "onCall/userNotificationRule", + &module{version}, + ) } diff --git a/sdk/go/grafana/oncall/userNotificationRule.go b/sdk/go/grafana/oncall/userNotificationRule.go new file mode 100644 index 00000000..ab33f2f4 --- /dev/null +++ b/sdk/go/grafana/oncall/userNotificationRule.go @@ -0,0 +1,392 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package oncall + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/internal" +) + +// * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/) +// +// **Note**: you must be running Grafana OnCall >= v1.8.0 to use this resource. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/onCall" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// myUser, err := onCall.GetUser(ctx, &oncall.GetUserArgs{ +// Username: "my_username", +// }, nil) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_1", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Position: pulumi.Int(0), +// Type: pulumi.String("notify_by_mobile_app"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_2", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Position: pulumi.Int(1), +// Duration: pulumi.Int(600), +// Type: pulumi.String("wait"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_3", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Position: pulumi.Int(2), +// Type: pulumi.String("notify_by_phone_call"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_4", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Position: pulumi.Int(3), +// Duration: pulumi.Int(300), +// Type: pulumi.String("wait"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_5", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Position: pulumi.Int(4), +// Type: pulumi.String("notify_by_slack"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_1", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Important: pulumi.Bool(true), +// Position: pulumi.Int(0), +// Type: pulumi.String("notify_by_mobile_app_critical"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_2", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Important: pulumi.Bool(true), +// Position: pulumi.Int(1), +// Duration: pulumi.Int(300), +// Type: pulumi.String("wait"), +// }) +// if err != nil { +// return err +// } +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_3", &onCall.UserNotificationRuleArgs{ +// UserId: pulumi.String(myUser.Id), +// Important: pulumi.Bool(true), +// Position: pulumi.Int(2), +// Type: pulumi.String("notify_by_mobile_app_critical"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// ```sh +// $ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name "{{ id }}" +// ``` +type UserNotificationRule struct { + pulumi.CustomResourceState + + // A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + Duration pulumi.IntPtrOutput `pulumi:"duration"` + // Boolean value which indicates if a rule is “important” + Important pulumi.BoolOutput `pulumi:"important"` + // Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + Position pulumi.IntPtrOutput `pulumi:"position"` + // The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + Type pulumi.StringOutput `pulumi:"type"` + // User ID + UserId pulumi.StringOutput `pulumi:"userId"` +} + +// NewUserNotificationRule registers a new resource with the given unique name, arguments, and options. +func NewUserNotificationRule(ctx *pulumi.Context, + name string, args *UserNotificationRuleArgs, opts ...pulumi.ResourceOption) (*UserNotificationRule, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Type == nil { + return nil, errors.New("invalid value for required argument 'Type'") + } + if args.UserId == nil { + return nil, errors.New("invalid value for required argument 'UserId'") + } + aliases := pulumi.Aliases([]pulumi.Alias{ + { + Type: pulumi.String("grafana:index/oncallUserNotificationRule:OncallUserNotificationRule"), + }, + }) + opts = append(opts, aliases) + opts = internal.PkgResourceDefaultOpts(opts) + var resource UserNotificationRule + err := ctx.RegisterResource("grafana:onCall/userNotificationRule:UserNotificationRule", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetUserNotificationRule gets an existing UserNotificationRule resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetUserNotificationRule(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *UserNotificationRuleState, opts ...pulumi.ResourceOption) (*UserNotificationRule, error) { + var resource UserNotificationRule + err := ctx.ReadResource("grafana:onCall/userNotificationRule:UserNotificationRule", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering UserNotificationRule resources. +type userNotificationRuleState struct { + // A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + Duration *int `pulumi:"duration"` + // Boolean value which indicates if a rule is “important” + Important *bool `pulumi:"important"` + // Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + Position *int `pulumi:"position"` + // The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + Type *string `pulumi:"type"` + // User ID + UserId *string `pulumi:"userId"` +} + +type UserNotificationRuleState struct { + // A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + Duration pulumi.IntPtrInput + // Boolean value which indicates if a rule is “important” + Important pulumi.BoolPtrInput + // Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + Position pulumi.IntPtrInput + // The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + Type pulumi.StringPtrInput + // User ID + UserId pulumi.StringPtrInput +} + +func (UserNotificationRuleState) ElementType() reflect.Type { + return reflect.TypeOf((*userNotificationRuleState)(nil)).Elem() +} + +type userNotificationRuleArgs struct { + // A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + Duration *int `pulumi:"duration"` + // Boolean value which indicates if a rule is “important” + Important *bool `pulumi:"important"` + // Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + Position *int `pulumi:"position"` + // The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + Type string `pulumi:"type"` + // User ID + UserId string `pulumi:"userId"` +} + +// The set of arguments for constructing a UserNotificationRule resource. +type UserNotificationRuleArgs struct { + // A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + Duration pulumi.IntPtrInput + // Boolean value which indicates if a rule is “important” + Important pulumi.BoolPtrInput + // Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + Position pulumi.IntPtrInput + // The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + Type pulumi.StringInput + // User ID + UserId pulumi.StringInput +} + +func (UserNotificationRuleArgs) ElementType() reflect.Type { + return reflect.TypeOf((*userNotificationRuleArgs)(nil)).Elem() +} + +type UserNotificationRuleInput interface { + pulumi.Input + + ToUserNotificationRuleOutput() UserNotificationRuleOutput + ToUserNotificationRuleOutputWithContext(ctx context.Context) UserNotificationRuleOutput +} + +func (*UserNotificationRule) ElementType() reflect.Type { + return reflect.TypeOf((**UserNotificationRule)(nil)).Elem() +} + +func (i *UserNotificationRule) ToUserNotificationRuleOutput() UserNotificationRuleOutput { + return i.ToUserNotificationRuleOutputWithContext(context.Background()) +} + +func (i *UserNotificationRule) ToUserNotificationRuleOutputWithContext(ctx context.Context) UserNotificationRuleOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserNotificationRuleOutput) +} + +// UserNotificationRuleArrayInput is an input type that accepts UserNotificationRuleArray and UserNotificationRuleArrayOutput values. +// You can construct a concrete instance of `UserNotificationRuleArrayInput` via: +// +// UserNotificationRuleArray{ UserNotificationRuleArgs{...} } +type UserNotificationRuleArrayInput interface { + pulumi.Input + + ToUserNotificationRuleArrayOutput() UserNotificationRuleArrayOutput + ToUserNotificationRuleArrayOutputWithContext(context.Context) UserNotificationRuleArrayOutput +} + +type UserNotificationRuleArray []UserNotificationRuleInput + +func (UserNotificationRuleArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserNotificationRule)(nil)).Elem() +} + +func (i UserNotificationRuleArray) ToUserNotificationRuleArrayOutput() UserNotificationRuleArrayOutput { + return i.ToUserNotificationRuleArrayOutputWithContext(context.Background()) +} + +func (i UserNotificationRuleArray) ToUserNotificationRuleArrayOutputWithContext(ctx context.Context) UserNotificationRuleArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserNotificationRuleArrayOutput) +} + +// UserNotificationRuleMapInput is an input type that accepts UserNotificationRuleMap and UserNotificationRuleMapOutput values. +// You can construct a concrete instance of `UserNotificationRuleMapInput` via: +// +// UserNotificationRuleMap{ "key": UserNotificationRuleArgs{...} } +type UserNotificationRuleMapInput interface { + pulumi.Input + + ToUserNotificationRuleMapOutput() UserNotificationRuleMapOutput + ToUserNotificationRuleMapOutputWithContext(context.Context) UserNotificationRuleMapOutput +} + +type UserNotificationRuleMap map[string]UserNotificationRuleInput + +func (UserNotificationRuleMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserNotificationRule)(nil)).Elem() +} + +func (i UserNotificationRuleMap) ToUserNotificationRuleMapOutput() UserNotificationRuleMapOutput { + return i.ToUserNotificationRuleMapOutputWithContext(context.Background()) +} + +func (i UserNotificationRuleMap) ToUserNotificationRuleMapOutputWithContext(ctx context.Context) UserNotificationRuleMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserNotificationRuleMapOutput) +} + +type UserNotificationRuleOutput struct{ *pulumi.OutputState } + +func (UserNotificationRuleOutput) ElementType() reflect.Type { + return reflect.TypeOf((**UserNotificationRule)(nil)).Elem() +} + +func (o UserNotificationRuleOutput) ToUserNotificationRuleOutput() UserNotificationRuleOutput { + return o +} + +func (o UserNotificationRuleOutput) ToUserNotificationRuleOutputWithContext(ctx context.Context) UserNotificationRuleOutput { + return o +} + +// A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 +func (o UserNotificationRuleOutput) Duration() pulumi.IntPtrOutput { + return o.ApplyT(func(v *UserNotificationRule) pulumi.IntPtrOutput { return v.Duration }).(pulumi.IntPtrOutput) +} + +// Boolean value which indicates if a rule is “important” +func (o UserNotificationRuleOutput) Important() pulumi.BoolOutput { + return o.ApplyT(func(v *UserNotificationRule) pulumi.BoolOutput { return v.Important }).(pulumi.BoolOutput) +} + +// Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. +func (o UserNotificationRuleOutput) Position() pulumi.IntPtrOutput { + return o.ApplyT(func(v *UserNotificationRule) pulumi.IntPtrOutput { return v.Position }).(pulumi.IntPtrOutput) +} + +// The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. +func (o UserNotificationRuleOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v *UserNotificationRule) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) +} + +// User ID +func (o UserNotificationRuleOutput) UserId() pulumi.StringOutput { + return o.ApplyT(func(v *UserNotificationRule) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput) +} + +type UserNotificationRuleArrayOutput struct{ *pulumi.OutputState } + +func (UserNotificationRuleArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserNotificationRule)(nil)).Elem() +} + +func (o UserNotificationRuleArrayOutput) ToUserNotificationRuleArrayOutput() UserNotificationRuleArrayOutput { + return o +} + +func (o UserNotificationRuleArrayOutput) ToUserNotificationRuleArrayOutputWithContext(ctx context.Context) UserNotificationRuleArrayOutput { + return o +} + +func (o UserNotificationRuleArrayOutput) Index(i pulumi.IntInput) UserNotificationRuleOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserNotificationRule { + return vs[0].([]*UserNotificationRule)[vs[1].(int)] + }).(UserNotificationRuleOutput) +} + +type UserNotificationRuleMapOutput struct{ *pulumi.OutputState } + +func (UserNotificationRuleMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserNotificationRule)(nil)).Elem() +} + +func (o UserNotificationRuleMapOutput) ToUserNotificationRuleMapOutput() UserNotificationRuleMapOutput { + return o +} + +func (o UserNotificationRuleMapOutput) ToUserNotificationRuleMapOutputWithContext(ctx context.Context) UserNotificationRuleMapOutput { + return o +} + +func (o UserNotificationRuleMapOutput) MapIndex(k pulumi.StringInput) UserNotificationRuleOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserNotificationRule { + return vs[0].(map[string]*UserNotificationRule)[vs[1].(string)] + }).(UserNotificationRuleOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*UserNotificationRuleInput)(nil)).Elem(), &UserNotificationRule{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserNotificationRuleArrayInput)(nil)).Elem(), UserNotificationRuleArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserNotificationRuleMapInput)(nil)).Elem(), UserNotificationRuleMap{}) + pulumi.RegisterOutputType(UserNotificationRuleOutput{}) + pulumi.RegisterOutputType(UserNotificationRuleArrayOutput{}) + pulumi.RegisterOutputType(UserNotificationRuleMapOutput{}) +} diff --git a/sdk/go/grafana/oncallEscalation.go b/sdk/go/grafana/oncallEscalation.go index c45c9643..06844420 100644 --- a/sdk/go/grafana/oncallEscalation.go +++ b/sdk/go/grafana/oncallEscalation.go @@ -69,12 +69,6 @@ func NewOncallEscalation(ctx *pulumi.Context, if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallEscalation:OncallEscalation"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallEscalation err := ctx.RegisterResource("grafana:index/oncallEscalation:OncallEscalation", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallEscalationChain.go b/sdk/go/grafana/oncallEscalationChain.go index ac9e5b05..23155a03 100644 --- a/sdk/go/grafana/oncallEscalationChain.go +++ b/sdk/go/grafana/oncallEscalationChain.go @@ -62,12 +62,6 @@ func NewOncallEscalationChain(ctx *pulumi.Context, args = &OncallEscalationChainArgs{} } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallEscalationChain:OncallEscalationChain"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallEscalationChain err := ctx.RegisterResource("grafana:index/oncallEscalationChain:OncallEscalationChain", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallIntegration.go b/sdk/go/grafana/oncallIntegration.go index a23e0b6e..140e7858 100644 --- a/sdk/go/grafana/oncallIntegration.go +++ b/sdk/go/grafana/oncallIntegration.go @@ -98,12 +98,6 @@ func NewOncallIntegration(ctx *pulumi.Context, if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallIntegration:OncallIntegration"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallIntegration err := ctx.RegisterResource("grafana:index/oncallIntegration:OncallIntegration", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallOnCallShift.go b/sdk/go/grafana/oncallOnCallShift.go index acaaecc2..a87c44a8 100644 --- a/sdk/go/grafana/oncallOnCallShift.go +++ b/sdk/go/grafana/oncallOnCallShift.go @@ -74,12 +74,6 @@ func NewOncallOnCallShift(ctx *pulumi.Context, if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallOnCallShift:OncallOnCallShift"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallOnCallShift err := ctx.RegisterResource("grafana:index/oncallOnCallShift:OncallOnCallShift", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallOutgoingWebhook.go b/sdk/go/grafana/oncallOutgoingWebhook.go index 796df96d..f86c3616 100644 --- a/sdk/go/grafana/oncallOutgoingWebhook.go +++ b/sdk/go/grafana/oncallOutgoingWebhook.go @@ -91,12 +91,6 @@ func NewOncallOutgoingWebhook(ctx *pulumi.Context, if args.Url == nil { return nil, errors.New("invalid value for required argument 'Url'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook"), - }, - }) - opts = append(opts, aliases) if args.AuthorizationHeader != nil { args.AuthorizationHeader = pulumi.ToSecret(args.AuthorizationHeader).(pulumi.StringPtrInput) } diff --git a/sdk/go/grafana/oncallRoute.go b/sdk/go/grafana/oncallRoute.go index 6378acf6..8f99ef9c 100644 --- a/sdk/go/grafana/oncallRoute.go +++ b/sdk/go/grafana/oncallRoute.go @@ -122,12 +122,6 @@ func NewOncallRoute(ctx *pulumi.Context, if args.RoutingRegex == nil { return nil, errors.New("invalid value for required argument 'RoutingRegex'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallRoute:OncallRoute"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallRoute err := ctx.RegisterResource("grafana:index/oncallRoute:OncallRoute", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallSchedule.go b/sdk/go/grafana/oncallSchedule.go index aeb9c73d..dba11df8 100644 --- a/sdk/go/grafana/oncallSchedule.go +++ b/sdk/go/grafana/oncallSchedule.go @@ -54,12 +54,6 @@ func NewOncallSchedule(ctx *pulumi.Context, if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/oncallSchedule:OncallSchedule"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource OncallSchedule err := ctx.RegisterResource("grafana:index/oncallSchedule:OncallSchedule", name, args, &resource, opts...) diff --git a/sdk/go/grafana/oncallUserNotificationRule.go b/sdk/go/grafana/oncallUserNotificationRule.go index 93e18df3..47d35a06 100644 --- a/sdk/go/grafana/oncallUserNotificationRule.go +++ b/sdk/go/grafana/oncallUserNotificationRule.go @@ -24,7 +24,6 @@ import ( // import ( // // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// "github.com/pulumiverse/pulumi-grafana/sdk/go/grafana" // "github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/onCall" // // ) @@ -37,7 +36,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_step_1", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_1", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Position: pulumi.Int(0), // Type: pulumi.String("notify_by_mobile_app"), @@ -45,7 +44,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_step_2", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_2", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Position: pulumi.Int(1), // Duration: pulumi.Int(600), @@ -54,7 +53,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_step_3", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_3", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Position: pulumi.Int(2), // Type: pulumi.String("notify_by_phone_call"), @@ -62,7 +61,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_step_4", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_4", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Position: pulumi.Int(3), // Duration: pulumi.Int(300), @@ -71,7 +70,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_step_5", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_step_5", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Position: pulumi.Int(4), // Type: pulumi.String("notify_by_slack"), @@ -79,7 +78,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_important_step_1", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_1", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Important: pulumi.Bool(true), // Position: pulumi.Int(0), @@ -88,7 +87,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_important_step_2", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_2", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Important: pulumi.Bool(true), // Position: pulumi.Int(1), @@ -98,7 +97,7 @@ import ( // if err != nil { // return err // } -// _, err = grafana.NewOncallUserNotificationRule(ctx, "my_user_important_step_3", &grafana.OncallUserNotificationRuleArgs{ +// _, err = onCall.NewUserNotificationRule(ctx, "my_user_important_step_3", &onCall.UserNotificationRuleArgs{ // UserId: pulumi.String(myUser.Id), // Important: pulumi.Bool(true), // Position: pulumi.Int(2), @@ -118,6 +117,8 @@ import ( // ```sh // $ pulumi import grafana:index/oncallUserNotificationRule:OncallUserNotificationRule name "{{ id }}" // ``` +// +// Deprecated: grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule type OncallUserNotificationRule struct { pulumi.CustomResourceState diff --git a/sdk/go/grafana/syntheticMonitoringCheck.go b/sdk/go/grafana/syntheticMonitoringCheck.go index 16a42856..cff44df7 100644 --- a/sdk/go/grafana/syntheticMonitoringCheck.go +++ b/sdk/go/grafana/syntheticMonitoringCheck.go @@ -657,12 +657,6 @@ func NewSyntheticMonitoringCheck(ctx *pulumi.Context, if args.Target == nil { return nil, errors.New("invalid value for required argument 'Target'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck"), - }, - }) - opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource SyntheticMonitoringCheck err := ctx.RegisterResource("grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck", name, args, &resource, opts...) diff --git a/sdk/go/grafana/syntheticMonitoringInstallation.go b/sdk/go/grafana/syntheticMonitoringInstallation.go index 263f24bd..1ceab1b8 100644 --- a/sdk/go/grafana/syntheticMonitoringInstallation.go +++ b/sdk/go/grafana/syntheticMonitoringInstallation.go @@ -129,12 +129,6 @@ func NewSyntheticMonitoringInstallation(ctx *pulumi.Context, if args.StackId == nil { return nil, errors.New("invalid value for required argument 'StackId'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation"), - }, - }) - opts = append(opts, aliases) if args.MetricsPublisherKey != nil { args.MetricsPublisherKey = pulumi.ToSecret(args.MetricsPublisherKey).(pulumi.StringInput) } diff --git a/sdk/go/grafana/syntheticMonitoringProbe.go b/sdk/go/grafana/syntheticMonitoringProbe.go index b32f8046..868efd07 100644 --- a/sdk/go/grafana/syntheticMonitoringProbe.go +++ b/sdk/go/grafana/syntheticMonitoringProbe.go @@ -101,12 +101,6 @@ func NewSyntheticMonitoringProbe(ctx *pulumi.Context, if args.Region == nil { return nil, errors.New("invalid value for required argument 'Region'") } - aliases := pulumi.Aliases([]pulumi.Alias{ - { - Type: pulumi.String("grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe"), - }, - }) - opts = append(opts, aliases) secrets := pulumi.AdditionalSecretOutputs([]string{ "authToken", }) diff --git a/sdk/nodejs/cloudAccessPolicy.ts b/sdk/nodejs/cloudAccessPolicy.ts index 754d99fa..0327992e 100644 --- a/sdk/nodejs/cloudAccessPolicy.ts +++ b/sdk/nodejs/cloudAccessPolicy.ts @@ -163,8 +163,6 @@ export class CloudAccessPolicy extends pulumi.CustomResource { resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudAccessPolicy:CloudAccessPolicy" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(CloudAccessPolicy.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/cloudAccessPolicyToken.ts b/sdk/nodejs/cloudAccessPolicyToken.ts index e21354ef..ef24dc97 100644 --- a/sdk/nodejs/cloudAccessPolicyToken.ts +++ b/sdk/nodejs/cloudAccessPolicyToken.ts @@ -158,8 +158,6 @@ export class CloudAccessPolicyToken extends pulumi.CustomResource { resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); const secretOpts = { additionalSecretOutputs: ["token"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(CloudAccessPolicyToken.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/cloudOrgMember.ts b/sdk/nodejs/cloudOrgMember.ts index 381c280e..7fef94df 100644 --- a/sdk/nodejs/cloudOrgMember.ts +++ b/sdk/nodejs/cloudOrgMember.ts @@ -98,8 +98,6 @@ export class CloudOrgMember extends pulumi.CustomResource { resourceInputs["user"] = args ? args.user : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudOrgMember:CloudOrgMember" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(CloudOrgMember.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/cloudPluginInstallation.ts b/sdk/nodejs/cloudPluginInstallation.ts index 6f1f3e5d..9bd98b03 100644 --- a/sdk/nodejs/cloudPluginInstallation.ts +++ b/sdk/nodejs/cloudPluginInstallation.ts @@ -113,8 +113,6 @@ export class CloudPluginInstallation extends pulumi.CustomResource { resourceInputs["version"] = args ? args.version : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudPluginInstallation:CloudPluginInstallation" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(CloudPluginInstallation.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/cloudStack.ts b/sdk/nodejs/cloudStack.ts index 2c7336a3..b33896ad 100644 --- a/sdk/nodejs/cloudStack.ts +++ b/sdk/nodejs/cloudStack.ts @@ -283,8 +283,6 @@ export class CloudStack extends pulumi.CustomResource { resourceInputs["tracesUserId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudStack:CloudStack" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(CloudStack.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/cloudStackServiceAccount.ts b/sdk/nodejs/cloudStackServiceAccount.ts index 2fcfee45..facaef75 100644 --- a/sdk/nodejs/cloudStackServiceAccount.ts +++ b/sdk/nodejs/cloudStackServiceAccount.ts @@ -115,8 +115,6 @@ export class CloudStackServiceAccount extends pulumi.CustomResource { resourceInputs["stackSlug"] = args ? args.stackSlug : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudStackServiceAccount:CloudStackServiceAccount" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(CloudStackServiceAccount.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/cloudStackServiceAccountToken.ts b/sdk/nodejs/cloudStackServiceAccountToken.ts index b615e637..c760929e 100644 --- a/sdk/nodejs/cloudStackServiceAccountToken.ts +++ b/sdk/nodejs/cloudStackServiceAccountToken.ts @@ -113,8 +113,6 @@ export class CloudStackServiceAccountToken extends pulumi.CustomResource { resourceInputs["key"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); const secretOpts = { additionalSecretOutputs: ["key"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(CloudStackServiceAccountToken.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/machineLearningHoliday.ts b/sdk/nodejs/machineLearningHoliday.ts index 2865cc94..42f255d5 100644 --- a/sdk/nodejs/machineLearningHoliday.ts +++ b/sdk/nodejs/machineLearningHoliday.ts @@ -99,8 +99,6 @@ export class MachineLearningHoliday extends pulumi.CustomResource { resourceInputs["name"] = args ? args.name : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/machineLearningHoliday:MachineLearningHoliday" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(MachineLearningHoliday.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/machineLearningJob.ts b/sdk/nodejs/machineLearningJob.ts index 1869ef59..46399c5d 100644 --- a/sdk/nodejs/machineLearningJob.ts +++ b/sdk/nodejs/machineLearningJob.ts @@ -143,8 +143,6 @@ export class MachineLearningJob extends pulumi.CustomResource { resourceInputs["trainingWindow"] = args ? args.trainingWindow : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/machineLearningJob:MachineLearningJob" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(MachineLearningJob.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/machineLearningOutlierDetector.ts b/sdk/nodejs/machineLearningOutlierDetector.ts index 47d27fe8..f2241699 100644 --- a/sdk/nodejs/machineLearningOutlierDetector.ts +++ b/sdk/nodejs/machineLearningOutlierDetector.ts @@ -134,8 +134,6 @@ export class MachineLearningOutlierDetector extends pulumi.CustomResource { resourceInputs["queryParams"] = args ? args.queryParams : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(MachineLearningOutlierDetector.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncall/index.ts b/sdk/nodejs/oncall/index.ts index be60a888..6c77fa71 100644 --- a/sdk/nodejs/oncall/index.ts +++ b/sdk/nodejs/oncall/index.ts @@ -80,6 +80,11 @@ export type Schedule = import("./schedule").Schedule; export const Schedule: typeof import("./schedule").Schedule = null as any; utilities.lazyLoad(exports, ["Schedule"], () => require("./schedule")); +export { UserNotificationRuleArgs, UserNotificationRuleState } from "./userNotificationRule"; +export type UserNotificationRule = import("./userNotificationRule").UserNotificationRule; +export const UserNotificationRule: typeof import("./userNotificationRule").UserNotificationRule = null as any; +utilities.lazyLoad(exports, ["UserNotificationRule"], () => require("./userNotificationRule")); + const _module = { version: utilities.getVersion(), @@ -99,6 +104,8 @@ const _module = { return new Route(name, undefined, { urn }) case "grafana:onCall/schedule:Schedule": return new Schedule(name, undefined, { urn }) + case "grafana:onCall/userNotificationRule:UserNotificationRule": + return new UserNotificationRule(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } @@ -111,3 +118,4 @@ pulumi.runtime.registerResourceModule("grafana", "onCall/onCallShift", _module) pulumi.runtime.registerResourceModule("grafana", "onCall/outgoingWebhook", _module) pulumi.runtime.registerResourceModule("grafana", "onCall/route", _module) pulumi.runtime.registerResourceModule("grafana", "onCall/schedule", _module) +pulumi.runtime.registerResourceModule("grafana", "onCall/userNotificationRule", _module) diff --git a/sdk/nodejs/oncall/userNotificationRule.ts b/sdk/nodejs/oncall/userNotificationRule.ts new file mode 100644 index 00000000..e6f4144f --- /dev/null +++ b/sdk/nodejs/oncall/userNotificationRule.ts @@ -0,0 +1,214 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "../utilities"; + +/** + * * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/) + * + * **Note**: you must be running Grafana OnCall >= v1.8.0 to use this resource. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as grafana from "@pulumi/grafana"; + * import * as grafana from "@pulumiverse/grafana"; + * + * const myUser = grafana.onCall.getUser({ + * username: "my_username", + * }); + * const myUserStep1 = new grafana.oncall.UserNotificationRule("my_user_step_1", { + * userId: myUser.then(myUser => myUser.id), + * position: 0, + * type: "notify_by_mobile_app", + * }); + * const myUserStep2 = new grafana.oncall.UserNotificationRule("my_user_step_2", { + * userId: myUser.then(myUser => myUser.id), + * position: 1, + * duration: 600, + * type: "wait", + * }); + * const myUserStep3 = new grafana.oncall.UserNotificationRule("my_user_step_3", { + * userId: myUser.then(myUser => myUser.id), + * position: 2, + * type: "notify_by_phone_call", + * }); + * const myUserStep4 = new grafana.oncall.UserNotificationRule("my_user_step_4", { + * userId: myUser.then(myUser => myUser.id), + * position: 3, + * duration: 300, + * type: "wait", + * }); + * const myUserStep5 = new grafana.oncall.UserNotificationRule("my_user_step_5", { + * userId: myUser.then(myUser => myUser.id), + * position: 4, + * type: "notify_by_slack", + * }); + * const myUserImportantStep1 = new grafana.oncall.UserNotificationRule("my_user_important_step_1", { + * userId: myUser.then(myUser => myUser.id), + * important: true, + * position: 0, + * type: "notify_by_mobile_app_critical", + * }); + * const myUserImportantStep2 = new grafana.oncall.UserNotificationRule("my_user_important_step_2", { + * userId: myUser.then(myUser => myUser.id), + * important: true, + * position: 1, + * duration: 300, + * type: "wait", + * }); + * const myUserImportantStep3 = new grafana.oncall.UserNotificationRule("my_user_important_step_3", { + * userId: myUser.then(myUser => myUser.id), + * important: true, + * position: 2, + * type: "notify_by_mobile_app_critical", + * }); + * ``` + * + * ## Import + * + * ```sh + * $ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name "{{ id }}" + * ``` + */ +export class UserNotificationRule extends pulumi.CustomResource { + /** + * Get an existing UserNotificationRule 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 Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: UserNotificationRuleState, opts?: pulumi.CustomResourceOptions): UserNotificationRule { + return new UserNotificationRule(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'grafana:onCall/userNotificationRule:UserNotificationRule'; + + /** + * Returns true if the given object is an instance of UserNotificationRule. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is UserNotificationRule { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === UserNotificationRule.__pulumiType; + } + + /** + * A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + */ + public readonly duration!: pulumi.Output; + /** + * Boolean value which indicates if a rule is “important” + */ + public readonly important!: pulumi.Output; + /** + * Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + */ + public readonly position!: pulumi.Output; + /** + * The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + */ + public readonly type!: pulumi.Output; + /** + * User ID + */ + public readonly userId!: pulumi.Output; + + /** + * Create a UserNotificationRule resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: UserNotificationRuleArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: UserNotificationRuleArgs | UserNotificationRuleState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as UserNotificationRuleState | undefined; + resourceInputs["duration"] = state ? state.duration : undefined; + resourceInputs["important"] = state ? state.important : undefined; + resourceInputs["position"] = state ? state.position : undefined; + resourceInputs["type"] = state ? state.type : undefined; + resourceInputs["userId"] = state ? state.userId : undefined; + } else { + const args = argsOrState as UserNotificationRuleArgs | undefined; + if ((!args || args.type === undefined) && !opts.urn) { + throw new Error("Missing required property 'type'"); + } + if ((!args || args.userId === undefined) && !opts.urn) { + throw new Error("Missing required property 'userId'"); + } + resourceInputs["duration"] = args ? args.duration : undefined; + resourceInputs["important"] = args ? args.important : undefined; + resourceInputs["position"] = args ? args.position : undefined; + resourceInputs["type"] = args ? args.type : undefined; + resourceInputs["userId"] = args ? args.userId : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + const aliasOpts = { aliases: [{ type: "grafana:index/oncallUserNotificationRule:OncallUserNotificationRule" }] }; + opts = pulumi.mergeOptions(opts, aliasOpts); + super(UserNotificationRule.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering UserNotificationRule resources. + */ +export interface UserNotificationRuleState { + /** + * A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + */ + duration?: pulumi.Input; + /** + * Boolean value which indicates if a rule is “important” + */ + important?: pulumi.Input; + /** + * Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + */ + position?: pulumi.Input; + /** + * The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + */ + type?: pulumi.Input; + /** + * User ID + */ + userId?: pulumi.Input; +} + +/** + * The set of arguments for constructing a UserNotificationRule resource. + */ +export interface UserNotificationRuleArgs { + /** + * A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + */ + duration?: pulumi.Input; + /** + * Boolean value which indicates if a rule is “important” + */ + important?: pulumi.Input; + /** + * Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + */ + position?: pulumi.Input; + /** + * The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notifyByMsteams` is only available for Grafana Cloud customers. + */ + type: pulumi.Input; + /** + * User ID + */ + userId: pulumi.Input; +} diff --git a/sdk/nodejs/oncallEscalation.ts b/sdk/nodejs/oncallEscalation.ts index e2ac0dcc..2e09a768 100644 --- a/sdk/nodejs/oncallEscalation.ts +++ b/sdk/nodejs/oncallEscalation.ts @@ -153,8 +153,6 @@ export class OncallEscalation extends pulumi.CustomResource { resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallEscalation:OncallEscalation" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallEscalation.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallEscalationChain.ts b/sdk/nodejs/oncallEscalationChain.ts index 70762099..55294ecf 100644 --- a/sdk/nodejs/oncallEscalationChain.ts +++ b/sdk/nodejs/oncallEscalationChain.ts @@ -86,8 +86,6 @@ export class OncallEscalationChain extends pulumi.CustomResource { resourceInputs["teamId"] = args ? args.teamId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallEscalationChain:OncallEscalationChain" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallEscalationChain.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallIntegration.ts b/sdk/nodejs/oncallIntegration.ts index 37996c6e..0de85055 100644 --- a/sdk/nodejs/oncallIntegration.ts +++ b/sdk/nodejs/oncallIntegration.ts @@ -140,8 +140,6 @@ export class OncallIntegration extends pulumi.CustomResource { resourceInputs["link"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallIntegration:OncallIntegration" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallIntegration.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallOnCallShift.ts b/sdk/nodejs/oncallOnCallShift.ts index 63bf4463..571bffea 100644 --- a/sdk/nodejs/oncallOnCallShift.ts +++ b/sdk/nodejs/oncallOnCallShift.ts @@ -170,8 +170,6 @@ export class OncallOnCallShift extends pulumi.CustomResource { resourceInputs["weekStart"] = args ? args.weekStart : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallOnCallShift:OncallOnCallShift" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallOnCallShift.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallOutgoingWebhook.ts b/sdk/nodejs/oncallOutgoingWebhook.ts index 7b06637b..2f56f941 100644 --- a/sdk/nodejs/oncallOutgoingWebhook.ts +++ b/sdk/nodejs/oncallOutgoingWebhook.ts @@ -164,8 +164,6 @@ export class OncallOutgoingWebhook extends pulumi.CustomResource { resourceInputs["user"] = args ? args.user : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); const secretOpts = { additionalSecretOutputs: ["authorizationHeader", "password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(OncallOutgoingWebhook.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/oncallRoute.ts b/sdk/nodejs/oncallRoute.ts index dc6c6b61..ecd27317 100644 --- a/sdk/nodejs/oncallRoute.ts +++ b/sdk/nodejs/oncallRoute.ts @@ -163,8 +163,6 @@ export class OncallRoute extends pulumi.CustomResource { resourceInputs["telegram"] = args ? args.telegram : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallRoute:OncallRoute" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallRoute.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallSchedule.ts b/sdk/nodejs/oncallSchedule.ts index 8045e7a8..5e9fb446 100644 --- a/sdk/nodejs/oncallSchedule.ts +++ b/sdk/nodejs/oncallSchedule.ts @@ -124,8 +124,6 @@ export class OncallSchedule extends pulumi.CustomResource { resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/oncallSchedule:OncallSchedule" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(OncallSchedule.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/oncallUserNotificationRule.ts b/sdk/nodejs/oncallUserNotificationRule.ts index a2a09822..099097f4 100644 --- a/sdk/nodejs/oncallUserNotificationRule.ts +++ b/sdk/nodejs/oncallUserNotificationRule.ts @@ -19,47 +19,47 @@ import * as utilities from "./utilities"; * const myUser = grafana.onCall.getUser({ * username: "my_username", * }); - * const myUserStep1 = new grafana.OncallUserNotificationRule("my_user_step_1", { + * const myUserStep1 = new grafana.oncall.UserNotificationRule("my_user_step_1", { * userId: myUser.then(myUser => myUser.id), * position: 0, * type: "notify_by_mobile_app", * }); - * const myUserStep2 = new grafana.OncallUserNotificationRule("my_user_step_2", { + * const myUserStep2 = new grafana.oncall.UserNotificationRule("my_user_step_2", { * userId: myUser.then(myUser => myUser.id), * position: 1, * duration: 600, * type: "wait", * }); - * const myUserStep3 = new grafana.OncallUserNotificationRule("my_user_step_3", { + * const myUserStep3 = new grafana.oncall.UserNotificationRule("my_user_step_3", { * userId: myUser.then(myUser => myUser.id), * position: 2, * type: "notify_by_phone_call", * }); - * const myUserStep4 = new grafana.OncallUserNotificationRule("my_user_step_4", { + * const myUserStep4 = new grafana.oncall.UserNotificationRule("my_user_step_4", { * userId: myUser.then(myUser => myUser.id), * position: 3, * duration: 300, * type: "wait", * }); - * const myUserStep5 = new grafana.OncallUserNotificationRule("my_user_step_5", { + * const myUserStep5 = new grafana.oncall.UserNotificationRule("my_user_step_5", { * userId: myUser.then(myUser => myUser.id), * position: 4, * type: "notify_by_slack", * }); - * const myUserImportantStep1 = new grafana.OncallUserNotificationRule("my_user_important_step_1", { + * const myUserImportantStep1 = new grafana.oncall.UserNotificationRule("my_user_important_step_1", { * userId: myUser.then(myUser => myUser.id), * important: true, * position: 0, * type: "notify_by_mobile_app_critical", * }); - * const myUserImportantStep2 = new grafana.OncallUserNotificationRule("my_user_important_step_2", { + * const myUserImportantStep2 = new grafana.oncall.UserNotificationRule("my_user_important_step_2", { * userId: myUser.then(myUser => myUser.id), * important: true, * position: 1, * duration: 300, * type: "wait", * }); - * const myUserImportantStep3 = new grafana.OncallUserNotificationRule("my_user_important_step_3", { + * const myUserImportantStep3 = new grafana.oncall.UserNotificationRule("my_user_important_step_3", { * userId: myUser.then(myUser => myUser.id), * important: true, * position: 2, @@ -72,6 +72,8 @@ import * as utilities from "./utilities"; * ```sh * $ pulumi import grafana:index/oncallUserNotificationRule:OncallUserNotificationRule name "{{ id }}" * ``` + * + * @deprecated grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule */ export class OncallUserNotificationRule extends pulumi.CustomResource { /** @@ -84,6 +86,7 @@ export class OncallUserNotificationRule extends pulumi.CustomResource { * @param opts Optional settings to control the behavior of the CustomResource. */ public static get(name: string, id: pulumi.Input, state?: OncallUserNotificationRuleState, opts?: pulumi.CustomResourceOptions): OncallUserNotificationRule { + pulumi.log.warn("OncallUserNotificationRule is deprecated: grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule") return new OncallUserNotificationRule(name, state, { ...opts, id: id }); } @@ -129,8 +132,11 @@ export class OncallUserNotificationRule extends pulumi.CustomResource { * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ + /** @deprecated grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule */ constructor(name: string, args: OncallUserNotificationRuleArgs, opts?: pulumi.CustomResourceOptions) + /** @deprecated grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule */ constructor(name: string, argsOrState?: OncallUserNotificationRuleArgs | OncallUserNotificationRuleState, opts?: pulumi.CustomResourceOptions) { + pulumi.log.warn("OncallUserNotificationRule is deprecated: grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule") let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { diff --git a/sdk/nodejs/syntheticMonitoringCheck.ts b/sdk/nodejs/syntheticMonitoringCheck.ts index 49e3a1de..f6205a9a 100644 --- a/sdk/nodejs/syntheticMonitoringCheck.ts +++ b/sdk/nodejs/syntheticMonitoringCheck.ts @@ -529,8 +529,6 @@ export class SyntheticMonitoringCheck extends pulumi.CustomResource { resourceInputs["tenantId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); super(SyntheticMonitoringCheck.__pulumiType, name, resourceInputs, opts); } } diff --git a/sdk/nodejs/syntheticMonitoringInstallation.ts b/sdk/nodejs/syntheticMonitoringInstallation.ts index a75fd56f..6dc3de0b 100644 --- a/sdk/nodejs/syntheticMonitoringInstallation.ts +++ b/sdk/nodejs/syntheticMonitoringInstallation.ts @@ -144,8 +144,6 @@ export class SyntheticMonitoringInstallation extends pulumi.CustomResource { resourceInputs["smAccessToken"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); const secretOpts = { additionalSecretOutputs: ["metricsPublisherKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SyntheticMonitoringInstallation.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/syntheticMonitoringProbe.ts b/sdk/nodejs/syntheticMonitoringProbe.ts index 5c551768..f06d70b7 100644 --- a/sdk/nodejs/syntheticMonitoringProbe.ts +++ b/sdk/nodejs/syntheticMonitoringProbe.ts @@ -154,8 +154,6 @@ export class SyntheticMonitoringProbe extends pulumi.CustomResource { resourceInputs["tenantId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const aliasOpts = { aliases: [{ type: "grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe" }] }; - opts = pulumi.mergeOptions(opts, aliasOpts); const secretOpts = { additionalSecretOutputs: ["authToken"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SyntheticMonitoringProbe.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 2b3fb437..fbd50bcb 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -116,6 +116,7 @@ "oncall/outgoingWebhook.ts", "oncall/route.ts", "oncall/schedule.ts", + "oncall/userNotificationRule.ts", "oncallEscalation.ts", "oncallEscalationChain.ts", "oncallIntegration.ts", diff --git a/sdk/python/pulumiverse_grafana/__init__.py b/sdk/python/pulumiverse_grafana/__init__.py index ccc17b08..ea57bf2a 100644 --- a/sdk/python/pulumiverse_grafana/__init__.py +++ b/sdk/python/pulumiverse_grafana/__init__.py @@ -797,6 +797,14 @@ "grafana:onCall/schedule:Schedule": "Schedule" } }, + { + "pkg": "grafana", + "mod": "onCall/userNotificationRule", + "fqn": "pulumiverse_grafana.oncall", + "classes": { + "grafana:onCall/userNotificationRule:UserNotificationRule": "UserNotificationRule" + } + }, { "pkg": "grafana", "mod": "oss/annotation", diff --git a/sdk/python/pulumiverse_grafana/cloud_access_policy.py b/sdk/python/pulumiverse_grafana/cloud_access_policy.py index c270415b..9135487e 100644 --- a/sdk/python/pulumiverse_grafana/cloud_access_policy.py +++ b/sdk/python/pulumiverse_grafana/cloud_access_policy.py @@ -398,8 +398,6 @@ def _internal_init(__self__, __props__.__dict__["created_at"] = None __props__.__dict__["policy_id"] = None __props__.__dict__["updated_at"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudAccessPolicy:CloudAccessPolicy")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CloudAccessPolicy, __self__).__init__( 'grafana:index/cloudAccessPolicy:CloudAccessPolicy', resource_name, diff --git a/sdk/python/pulumiverse_grafana/cloud_access_policy_token.py b/sdk/python/pulumiverse_grafana/cloud_access_policy_token.py index 192ba2f4..d3a3bea7 100644 --- a/sdk/python/pulumiverse_grafana/cloud_access_policy_token.py +++ b/sdk/python/pulumiverse_grafana/cloud_access_policy_token.py @@ -400,8 +400,6 @@ def _internal_init(__self__, __props__.__dict__["created_at"] = None __props__.__dict__["token"] = None __props__.__dict__["updated_at"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["token"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(CloudAccessPolicyToken, __self__).__init__( diff --git a/sdk/python/pulumiverse_grafana/cloud_org_member.py b/sdk/python/pulumiverse_grafana/cloud_org_member.py index a75cdf70..4dd1c41b 100644 --- a/sdk/python/pulumiverse_grafana/cloud_org_member.py +++ b/sdk/python/pulumiverse_grafana/cloud_org_member.py @@ -242,8 +242,6 @@ def _internal_init(__self__, if user is None and not opts.urn: raise TypeError("Missing required property 'user'") __props__.__dict__["user"] = user - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudOrgMember:CloudOrgMember")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CloudOrgMember, __self__).__init__( 'grafana:index/cloudOrgMember:CloudOrgMember', resource_name, diff --git a/sdk/python/pulumiverse_grafana/cloud_plugin_installation.py b/sdk/python/pulumiverse_grafana/cloud_plugin_installation.py index cb218492..6186b048 100644 --- a/sdk/python/pulumiverse_grafana/cloud_plugin_installation.py +++ b/sdk/python/pulumiverse_grafana/cloud_plugin_installation.py @@ -246,8 +246,6 @@ def _internal_init(__self__, if version is None and not opts.urn: raise TypeError("Missing required property 'version'") __props__.__dict__["version"] = version - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudPluginInstallation:CloudPluginInstallation")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CloudPluginInstallation, __self__).__init__( 'grafana:index/cloudPluginInstallation:CloudPluginInstallation', resource_name, diff --git a/sdk/python/pulumiverse_grafana/cloud_stack.py b/sdk/python/pulumiverse_grafana/cloud_stack.py index 695c94e3..97e134c0 100644 --- a/sdk/python/pulumiverse_grafana/cloud_stack.py +++ b/sdk/python/pulumiverse_grafana/cloud_stack.py @@ -906,8 +906,6 @@ def _internal_init(__self__, __props__.__dict__["traces_status"] = None __props__.__dict__["traces_url"] = None __props__.__dict__["traces_user_id"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudStack:CloudStack")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CloudStack, __self__).__init__( 'grafana:index/cloudStack:CloudStack', resource_name, diff --git a/sdk/python/pulumiverse_grafana/cloud_stack_service_account.py b/sdk/python/pulumiverse_grafana/cloud_stack_service_account.py index 80533045..4ccaadc6 100644 --- a/sdk/python/pulumiverse_grafana/cloud_stack_service_account.py +++ b/sdk/python/pulumiverse_grafana/cloud_stack_service_account.py @@ -276,8 +276,6 @@ def _internal_init(__self__, if stack_slug is None and not opts.urn: raise TypeError("Missing required property 'stack_slug'") __props__.__dict__["stack_slug"] = stack_slug - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudStackServiceAccount:CloudStackServiceAccount")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(CloudStackServiceAccount, __self__).__init__( 'grafana:index/cloudStackServiceAccount:CloudStackServiceAccount', resource_name, diff --git a/sdk/python/pulumiverse_grafana/cloud_stack_service_account_token.py b/sdk/python/pulumiverse_grafana/cloud_stack_service_account_token.py index b5adde35..a5592b91 100644 --- a/sdk/python/pulumiverse_grafana/cloud_stack_service_account_token.py +++ b/sdk/python/pulumiverse_grafana/cloud_stack_service_account_token.py @@ -282,8 +282,6 @@ def _internal_init(__self__, __props__.__dict__["expiration"] = None __props__.__dict__["has_expired"] = None __props__.__dict__["key"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["key"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(CloudStackServiceAccountToken, __self__).__init__( diff --git a/sdk/python/pulumiverse_grafana/machine_learning_holiday.py b/sdk/python/pulumiverse_grafana/machine_learning_holiday.py index fd38eae2..9d19296f 100644 --- a/sdk/python/pulumiverse_grafana/machine_learning_holiday.py +++ b/sdk/python/pulumiverse_grafana/machine_learning_holiday.py @@ -281,8 +281,6 @@ def _internal_init(__self__, __props__.__dict__["ical_timezone"] = ical_timezone __props__.__dict__["ical_url"] = ical_url __props__.__dict__["name"] = name - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/machineLearningHoliday:MachineLearningHoliday")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(MachineLearningHoliday, __self__).__init__( 'grafana:index/machineLearningHoliday:MachineLearningHoliday', resource_name, diff --git a/sdk/python/pulumiverse_grafana/machine_learning_job.py b/sdk/python/pulumiverse_grafana/machine_learning_job.py index acdc01a1..c59f24a3 100644 --- a/sdk/python/pulumiverse_grafana/machine_learning_job.py +++ b/sdk/python/pulumiverse_grafana/machine_learning_job.py @@ -495,8 +495,6 @@ def _internal_init(__self__, raise TypeError("Missing required property 'query_params'") __props__.__dict__["query_params"] = query_params __props__.__dict__["training_window"] = training_window - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/machineLearningJob:MachineLearningJob")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(MachineLearningJob, __self__).__init__( 'grafana:index/machineLearningJob:MachineLearningJob', resource_name, diff --git a/sdk/python/pulumiverse_grafana/machine_learning_outlier_detector.py b/sdk/python/pulumiverse_grafana/machine_learning_outlier_detector.py index 25481f3f..eebd0a67 100644 --- a/sdk/python/pulumiverse_grafana/machine_learning_outlier_detector.py +++ b/sdk/python/pulumiverse_grafana/machine_learning_outlier_detector.py @@ -398,8 +398,6 @@ def _internal_init(__self__, if query_params is None and not opts.urn: raise TypeError("Missing required property 'query_params'") __props__.__dict__["query_params"] = query_params - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(MachineLearningOutlierDetector, __self__).__init__( 'grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall/__init__.py b/sdk/python/pulumiverse_grafana/oncall/__init__.py index 7ccfd2b8..178f8e04 100644 --- a/sdk/python/pulumiverse_grafana/oncall/__init__.py +++ b/sdk/python/pulumiverse_grafana/oncall/__init__.py @@ -20,5 +20,6 @@ from .outgoing_webhook import * from .route import * from .schedule import * +from .user_notification_rule import * from ._inputs import * from . import outputs diff --git a/sdk/python/pulumiverse_grafana/oncall/user_notification_rule.py b/sdk/python/pulumiverse_grafana/oncall/user_notification_rule.py new file mode 100644 index 00000000..19be08f6 --- /dev/null +++ b/sdk/python/pulumiverse_grafana/oncall/user_notification_rule.py @@ -0,0 +1,454 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from .. import _utilities + +__all__ = ['UserNotificationRuleArgs', 'UserNotificationRule'] + +@pulumi.input_type +class UserNotificationRuleArgs: + def __init__(__self__, *, + type: pulumi.Input[str], + user_id: pulumi.Input[str], + duration: Optional[pulumi.Input[int]] = None, + important: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None): + """ + The set of arguments for constructing a UserNotificationRule resource. + :param pulumi.Input[str] type: The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + :param pulumi.Input[str] user_id: User ID + :param pulumi.Input[int] duration: A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + :param pulumi.Input[bool] important: Boolean value which indicates if a rule is “important” + :param pulumi.Input[int] position: Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + """ + pulumi.set(__self__, "type", type) + pulumi.set(__self__, "user_id", user_id) + if duration is not None: + pulumi.set(__self__, "duration", duration) + if important is not None: + pulumi.set(__self__, "important", important) + if position is not None: + pulumi.set(__self__, "position", position) + + @property + @pulumi.getter + def type(self) -> pulumi.Input[str]: + """ + The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: pulumi.Input[str]): + pulumi.set(self, "type", value) + + @property + @pulumi.getter(name="userId") + def user_id(self) -> pulumi.Input[str]: + """ + User ID + """ + return pulumi.get(self, "user_id") + + @user_id.setter + def user_id(self, value: pulumi.Input[str]): + pulumi.set(self, "user_id", value) + + @property + @pulumi.getter + def duration(self) -> Optional[pulumi.Input[int]]: + """ + A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + """ + return pulumi.get(self, "duration") + + @duration.setter + def duration(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "duration", value) + + @property + @pulumi.getter + def important(self) -> Optional[pulumi.Input[bool]]: + """ + Boolean value which indicates if a rule is “important” + """ + return pulumi.get(self, "important") + + @important.setter + def important(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "important", value) + + @property + @pulumi.getter + def position(self) -> Optional[pulumi.Input[int]]: + """ + Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + """ + return pulumi.get(self, "position") + + @position.setter + def position(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "position", value) + + +@pulumi.input_type +class _UserNotificationRuleState: + def __init__(__self__, *, + duration: Optional[pulumi.Input[int]] = None, + important: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering UserNotificationRule resources. + :param pulumi.Input[int] duration: A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + :param pulumi.Input[bool] important: Boolean value which indicates if a rule is “important” + :param pulumi.Input[int] position: Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + :param pulumi.Input[str] type: The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + :param pulumi.Input[str] user_id: User ID + """ + if duration is not None: + pulumi.set(__self__, "duration", duration) + if important is not None: + pulumi.set(__self__, "important", important) + if position is not None: + pulumi.set(__self__, "position", position) + if type is not None: + pulumi.set(__self__, "type", type) + if user_id is not None: + pulumi.set(__self__, "user_id", user_id) + + @property + @pulumi.getter + def duration(self) -> Optional[pulumi.Input[int]]: + """ + A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + """ + return pulumi.get(self, "duration") + + @duration.setter + def duration(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "duration", value) + + @property + @pulumi.getter + def important(self) -> Optional[pulumi.Input[bool]]: + """ + Boolean value which indicates if a rule is “important” + """ + return pulumi.get(self, "important") + + @important.setter + def important(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "important", value) + + @property + @pulumi.getter + def position(self) -> Optional[pulumi.Input[int]]: + """ + Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + """ + return pulumi.get(self, "position") + + @position.setter + def position(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "position", value) + + @property + @pulumi.getter + def type(self) -> Optional[pulumi.Input[str]]: + """ + The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "type", value) + + @property + @pulumi.getter(name="userId") + def user_id(self) -> Optional[pulumi.Input[str]]: + """ + User ID + """ + return pulumi.get(self, "user_id") + + @user_id.setter + def user_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "user_id", value) + + +class UserNotificationRule(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + duration: Optional[pulumi.Input[int]] = None, + important: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/) + + **Note**: you must be running Grafana OnCall >= v1.8.0 to use this resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_grafana as grafana + import pulumiverse_grafana as grafana + + my_user = grafana.onCall.get_user(username="my_username") + my_user_step1 = grafana.on_call.UserNotificationRule("my_user_step_1", + user_id=my_user.id, + position=0, + type="notify_by_mobile_app") + my_user_step2 = grafana.on_call.UserNotificationRule("my_user_step_2", + user_id=my_user.id, + position=1, + duration=600, + type="wait") + my_user_step3 = grafana.on_call.UserNotificationRule("my_user_step_3", + user_id=my_user.id, + position=2, + type="notify_by_phone_call") + my_user_step4 = grafana.on_call.UserNotificationRule("my_user_step_4", + user_id=my_user.id, + position=3, + duration=300, + type="wait") + my_user_step5 = grafana.on_call.UserNotificationRule("my_user_step_5", + user_id=my_user.id, + position=4, + type="notify_by_slack") + my_user_important_step1 = grafana.on_call.UserNotificationRule("my_user_important_step_1", + user_id=my_user.id, + important=True, + position=0, + type="notify_by_mobile_app_critical") + my_user_important_step2 = grafana.on_call.UserNotificationRule("my_user_important_step_2", + user_id=my_user.id, + important=True, + position=1, + duration=300, + type="wait") + my_user_important_step3 = grafana.on_call.UserNotificationRule("my_user_important_step_3", + user_id=my_user.id, + important=True, + position=2, + type="notify_by_mobile_app_critical") + ``` + + ## Import + + ```sh + $ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name "{{ id }}" + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[int] duration: A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + :param pulumi.Input[bool] important: Boolean value which indicates if a rule is “important” + :param pulumi.Input[int] position: Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + :param pulumi.Input[str] type: The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + :param pulumi.Input[str] user_id: User ID + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: UserNotificationRuleArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/personal_notification_rules/) + + **Note**: you must be running Grafana OnCall >= v1.8.0 to use this resource. + + ## Example Usage + + ```python + import pulumi + import pulumi_grafana as grafana + import pulumiverse_grafana as grafana + + my_user = grafana.onCall.get_user(username="my_username") + my_user_step1 = grafana.on_call.UserNotificationRule("my_user_step_1", + user_id=my_user.id, + position=0, + type="notify_by_mobile_app") + my_user_step2 = grafana.on_call.UserNotificationRule("my_user_step_2", + user_id=my_user.id, + position=1, + duration=600, + type="wait") + my_user_step3 = grafana.on_call.UserNotificationRule("my_user_step_3", + user_id=my_user.id, + position=2, + type="notify_by_phone_call") + my_user_step4 = grafana.on_call.UserNotificationRule("my_user_step_4", + user_id=my_user.id, + position=3, + duration=300, + type="wait") + my_user_step5 = grafana.on_call.UserNotificationRule("my_user_step_5", + user_id=my_user.id, + position=4, + type="notify_by_slack") + my_user_important_step1 = grafana.on_call.UserNotificationRule("my_user_important_step_1", + user_id=my_user.id, + important=True, + position=0, + type="notify_by_mobile_app_critical") + my_user_important_step2 = grafana.on_call.UserNotificationRule("my_user_important_step_2", + user_id=my_user.id, + important=True, + position=1, + duration=300, + type="wait") + my_user_important_step3 = grafana.on_call.UserNotificationRule("my_user_important_step_3", + user_id=my_user.id, + important=True, + position=2, + type="notify_by_mobile_app_critical") + ``` + + ## Import + + ```sh + $ pulumi import grafana:onCall/userNotificationRule:UserNotificationRule name "{{ id }}" + ``` + + :param str resource_name: The name of the resource. + :param UserNotificationRuleArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(UserNotificationRuleArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + duration: Optional[pulumi.Input[int]] = None, + important: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = UserNotificationRuleArgs.__new__(UserNotificationRuleArgs) + + __props__.__dict__["duration"] = duration + __props__.__dict__["important"] = important + __props__.__dict__["position"] = position + if type is None and not opts.urn: + raise TypeError("Missing required property 'type'") + __props__.__dict__["type"] = type + if user_id is None and not opts.urn: + raise TypeError("Missing required property 'user_id'") + __props__.__dict__["user_id"] = user_id + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallUserNotificationRule:OncallUserNotificationRule")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(UserNotificationRule, __self__).__init__( + 'grafana:onCall/userNotificationRule:UserNotificationRule', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + duration: Optional[pulumi.Input[int]] = None, + important: Optional[pulumi.Input[bool]] = None, + position: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + user_id: Optional[pulumi.Input[str]] = None) -> 'UserNotificationRule': + """ + Get an existing UserNotificationRule resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[int] duration: A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + :param pulumi.Input[bool] important: Boolean value which indicates if a rule is “important” + :param pulumi.Input[int] position: Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + :param pulumi.Input[str] type: The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + :param pulumi.Input[str] user_id: User ID + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _UserNotificationRuleState.__new__(_UserNotificationRuleState) + + __props__.__dict__["duration"] = duration + __props__.__dict__["important"] = important + __props__.__dict__["position"] = position + __props__.__dict__["type"] = type + __props__.__dict__["user_id"] = user_id + return UserNotificationRule(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def duration(self) -> pulumi.Output[Optional[int]]: + """ + A time in seconds to wait (when `type=wait`). Can be 60, 300, 900, 1800, 3600 + """ + return pulumi.get(self, "duration") + + @property + @pulumi.getter + def important(self) -> pulumi.Output[bool]: + """ + Boolean value which indicates if a rule is “important” + """ + return pulumi.get(self, "important") + + @property + @pulumi.getter + def position(self) -> pulumi.Output[Optional[int]]: + """ + Personal notification rules execute one after another starting from position=0. A new escalation policy created with a position of an existing escalation policy will move the old one (and all following) down on the list. + """ + return pulumi.get(self, "position") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + The type of notification rule. Can be wait, notify*by*slack, notify*by*msteams, notify*by*sms, notify*by*phone*call, notify*by*telegram, notify*by*email, notify*by*mobile*app, notify*by*mobile*app*critical. NOTE: `notify_by_msteams` is only available for Grafana Cloud customers. + """ + return pulumi.get(self, "type") + + @property + @pulumi.getter(name="userId") + def user_id(self) -> pulumi.Output[str]: + """ + User ID + """ + return pulumi.get(self, "user_id") + diff --git a/sdk/python/pulumiverse_grafana/oncall_escalation.py b/sdk/python/pulumiverse_grafana/oncall_escalation.py index 83477c2d..a57e4f4c 100644 --- a/sdk/python/pulumiverse_grafana/oncall_escalation.py +++ b/sdk/python/pulumiverse_grafana/oncall_escalation.py @@ -568,8 +568,6 @@ def _internal_init(__self__, if type is None and not opts.urn: raise TypeError("Missing required property 'type'") __props__.__dict__["type"] = type - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallEscalation:OncallEscalation")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallEscalation, __self__).__init__( 'grafana:index/oncallEscalation:OncallEscalation', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_escalation_chain.py b/sdk/python/pulumiverse_grafana/oncall_escalation_chain.py index 0992cec5..65148cff 100644 --- a/sdk/python/pulumiverse_grafana/oncall_escalation_chain.py +++ b/sdk/python/pulumiverse_grafana/oncall_escalation_chain.py @@ -185,8 +185,6 @@ def _internal_init(__self__, __props__.__dict__["name"] = name __props__.__dict__["team_id"] = team_id - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallEscalationChain:OncallEscalationChain")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallEscalationChain, __self__).__init__( 'grafana:index/oncallEscalationChain:OncallEscalationChain', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_integration.py b/sdk/python/pulumiverse_grafana/oncall_integration.py index 4b023d13..f63e8445 100644 --- a/sdk/python/pulumiverse_grafana/oncall_integration.py +++ b/sdk/python/pulumiverse_grafana/oncall_integration.py @@ -354,8 +354,6 @@ def _internal_init(__self__, raise TypeError("Missing required property 'type'") __props__.__dict__["type"] = type __props__.__dict__["link"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallIntegration:OncallIntegration")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallIntegration, __self__).__init__( 'grafana:index/oncallIntegration:OncallIntegration', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_on_call_shift.py b/sdk/python/pulumiverse_grafana/oncall_on_call_shift.py index ce6c54df..741e89ab 100644 --- a/sdk/python/pulumiverse_grafana/oncall_on_call_shift.py +++ b/sdk/python/pulumiverse_grafana/oncall_on_call_shift.py @@ -674,8 +674,6 @@ def _internal_init(__self__, __props__.__dict__["type"] = type __props__.__dict__["users"] = users __props__.__dict__["week_start"] = week_start - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallOnCallShift:OncallOnCallShift")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallOnCallShift, __self__).__init__( 'grafana:index/oncallOnCallShift:OncallOnCallShift', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_outgoing_webhook.py b/sdk/python/pulumiverse_grafana/oncall_outgoing_webhook.py index 3b654247..87cedfc1 100644 --- a/sdk/python/pulumiverse_grafana/oncall_outgoing_webhook.py +++ b/sdk/python/pulumiverse_grafana/oncall_outgoing_webhook.py @@ -622,8 +622,6 @@ def _internal_init(__self__, raise TypeError("Missing required property 'url'") __props__.__dict__["url"] = url __props__.__dict__["user"] = user - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["authorizationHeader", "password"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(OncallOutgoingWebhook, __self__).__init__( diff --git a/sdk/python/pulumiverse_grafana/oncall_route.py b/sdk/python/pulumiverse_grafana/oncall_route.py index 49badc16..87275490 100644 --- a/sdk/python/pulumiverse_grafana/oncall_route.py +++ b/sdk/python/pulumiverse_grafana/oncall_route.py @@ -453,8 +453,6 @@ def _internal_init(__self__, __props__.__dict__["routing_type"] = routing_type __props__.__dict__["slack"] = slack __props__.__dict__["telegram"] = telegram - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallRoute:OncallRoute")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallRoute, __self__).__init__( 'grafana:index/oncallRoute:OncallRoute', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_schedule.py b/sdk/python/pulumiverse_grafana/oncall_schedule.py index 3fab3c90..155566d0 100644 --- a/sdk/python/pulumiverse_grafana/oncall_schedule.py +++ b/sdk/python/pulumiverse_grafana/oncall_schedule.py @@ -422,8 +422,6 @@ def _internal_init(__self__, if type is None and not opts.urn: raise TypeError("Missing required property 'type'") __props__.__dict__["type"] = type - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/oncallSchedule:OncallSchedule")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(OncallSchedule, __self__).__init__( 'grafana:index/oncallSchedule:OncallSchedule', resource_name, diff --git a/sdk/python/pulumiverse_grafana/oncall_user_notification_rule.py b/sdk/python/pulumiverse_grafana/oncall_user_notification_rule.py index 056e786f..b8637d9a 100644 --- a/sdk/python/pulumiverse_grafana/oncall_user_notification_rule.py +++ b/sdk/python/pulumiverse_grafana/oncall_user_notification_rule.py @@ -190,7 +190,12 @@ def user_id(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "user_id", value) +warnings.warn("""grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule""", DeprecationWarning) + + class OncallUserNotificationRule(pulumi.CustomResource): + warnings.warn("""grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule""", DeprecationWarning) + @overload def __init__(__self__, resource_name: str, @@ -214,40 +219,40 @@ def __init__(__self__, import pulumiverse_grafana as grafana my_user = grafana.onCall.get_user(username="my_username") - my_user_step1 = grafana.OncallUserNotificationRule("my_user_step_1", + my_user_step1 = grafana.on_call.UserNotificationRule("my_user_step_1", user_id=my_user.id, position=0, type="notify_by_mobile_app") - my_user_step2 = grafana.OncallUserNotificationRule("my_user_step_2", + my_user_step2 = grafana.on_call.UserNotificationRule("my_user_step_2", user_id=my_user.id, position=1, duration=600, type="wait") - my_user_step3 = grafana.OncallUserNotificationRule("my_user_step_3", + my_user_step3 = grafana.on_call.UserNotificationRule("my_user_step_3", user_id=my_user.id, position=2, type="notify_by_phone_call") - my_user_step4 = grafana.OncallUserNotificationRule("my_user_step_4", + my_user_step4 = grafana.on_call.UserNotificationRule("my_user_step_4", user_id=my_user.id, position=3, duration=300, type="wait") - my_user_step5 = grafana.OncallUserNotificationRule("my_user_step_5", + my_user_step5 = grafana.on_call.UserNotificationRule("my_user_step_5", user_id=my_user.id, position=4, type="notify_by_slack") - my_user_important_step1 = grafana.OncallUserNotificationRule("my_user_important_step_1", + my_user_important_step1 = grafana.on_call.UserNotificationRule("my_user_important_step_1", user_id=my_user.id, important=True, position=0, type="notify_by_mobile_app_critical") - my_user_important_step2 = grafana.OncallUserNotificationRule("my_user_important_step_2", + my_user_important_step2 = grafana.on_call.UserNotificationRule("my_user_important_step_2", user_id=my_user.id, important=True, position=1, duration=300, type="wait") - my_user_important_step3 = grafana.OncallUserNotificationRule("my_user_important_step_3", + my_user_important_step3 = grafana.on_call.UserNotificationRule("my_user_important_step_3", user_id=my_user.id, important=True, position=2, @@ -287,40 +292,40 @@ def __init__(__self__, import pulumiverse_grafana as grafana my_user = grafana.onCall.get_user(username="my_username") - my_user_step1 = grafana.OncallUserNotificationRule("my_user_step_1", + my_user_step1 = grafana.on_call.UserNotificationRule("my_user_step_1", user_id=my_user.id, position=0, type="notify_by_mobile_app") - my_user_step2 = grafana.OncallUserNotificationRule("my_user_step_2", + my_user_step2 = grafana.on_call.UserNotificationRule("my_user_step_2", user_id=my_user.id, position=1, duration=600, type="wait") - my_user_step3 = grafana.OncallUserNotificationRule("my_user_step_3", + my_user_step3 = grafana.on_call.UserNotificationRule("my_user_step_3", user_id=my_user.id, position=2, type="notify_by_phone_call") - my_user_step4 = grafana.OncallUserNotificationRule("my_user_step_4", + my_user_step4 = grafana.on_call.UserNotificationRule("my_user_step_4", user_id=my_user.id, position=3, duration=300, type="wait") - my_user_step5 = grafana.OncallUserNotificationRule("my_user_step_5", + my_user_step5 = grafana.on_call.UserNotificationRule("my_user_step_5", user_id=my_user.id, position=4, type="notify_by_slack") - my_user_important_step1 = grafana.OncallUserNotificationRule("my_user_important_step_1", + my_user_important_step1 = grafana.on_call.UserNotificationRule("my_user_important_step_1", user_id=my_user.id, important=True, position=0, type="notify_by_mobile_app_critical") - my_user_important_step2 = grafana.OncallUserNotificationRule("my_user_important_step_2", + my_user_important_step2 = grafana.on_call.UserNotificationRule("my_user_important_step_2", user_id=my_user.id, important=True, position=1, duration=300, type="wait") - my_user_important_step3 = grafana.OncallUserNotificationRule("my_user_important_step_3", + my_user_important_step3 = grafana.on_call.UserNotificationRule("my_user_important_step_3", user_id=my_user.id, important=True, position=2, @@ -354,6 +359,7 @@ def _internal_init(__self__, type: Optional[pulumi.Input[str]] = None, user_id: Optional[pulumi.Input[str]] = None, __props__=None): + pulumi.log.warn("""OncallUserNotificationRule is deprecated: grafana.index/oncallusernotificationrule.OncallUserNotificationRule has been deprecated in favor of grafana.oncall/usernotificationrule.UserNotificationRule""") opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') diff --git a/sdk/python/pulumiverse_grafana/synthetic_monitoring_check.py b/sdk/python/pulumiverse_grafana/synthetic_monitoring_check.py index 457af1eb..10b1ea86 100644 --- a/sdk/python/pulumiverse_grafana/synthetic_monitoring_check.py +++ b/sdk/python/pulumiverse_grafana/synthetic_monitoring_check.py @@ -1226,8 +1226,6 @@ def _internal_init(__self__, __props__.__dict__["target"] = target __props__.__dict__["timeout"] = timeout __props__.__dict__["tenant_id"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(SyntheticMonitoringCheck, __self__).__init__( 'grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck', resource_name, diff --git a/sdk/python/pulumiverse_grafana/synthetic_monitoring_installation.py b/sdk/python/pulumiverse_grafana/synthetic_monitoring_installation.py index 0256a7c1..12007452 100644 --- a/sdk/python/pulumiverse_grafana/synthetic_monitoring_installation.py +++ b/sdk/python/pulumiverse_grafana/synthetic_monitoring_installation.py @@ -316,8 +316,6 @@ def _internal_init(__self__, __props__.__dict__["stack_id"] = stack_id __props__.__dict__["stack_sm_api_url"] = stack_sm_api_url __props__.__dict__["sm_access_token"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["metricsPublisherKey"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(SyntheticMonitoringInstallation, __self__).__init__( diff --git a/sdk/python/pulumiverse_grafana/synthetic_monitoring_probe.py b/sdk/python/pulumiverse_grafana/synthetic_monitoring_probe.py index 467b2406..0af7da60 100644 --- a/sdk/python/pulumiverse_grafana/synthetic_monitoring_probe.py +++ b/sdk/python/pulumiverse_grafana/synthetic_monitoring_probe.py @@ -434,8 +434,6 @@ def _internal_init(__self__, __props__.__dict__["region"] = region __props__.__dict__["auth_token"] = None __props__.__dict__["tenant_id"] = None - alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe")]) - opts = pulumi.ResourceOptions.merge(opts, alias_opts) secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["authToken"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(SyntheticMonitoringProbe, __self__).__init__(