From 9ef2d59a2b7478260590c39178b727e3f66c7f55 Mon Sep 17 00:00:00 2001 From: VenelinMartinov Date: Fri, 10 May 2024 18:29:46 +0100 Subject: [PATCH] 3.12.0 upgrade (#492) had some conflicts so had to do it manually fixes https://github.com/pulumi/pulumi-pagerduty/issues/490 --- ...001-fixup-update-CHANGELOG.md-v3.8.1.patch | 25 ++- ...oned-util-package-for-more-resources.patch | 4 +- patches/0003-more-replaces.patch | 110 ++++++++++++ .../bridge-metadata.json | 15 +- .../cmd/pulumi-resource-pagerduty/schema.json | 94 +++++----- provider/go.mod | 5 +- provider/go.sum | 6 +- sdk/dotnet/Extension.cs | 2 +- sdk/dotnet/GetExtensionSchema.cs | 2 +- sdk/dotnet/GetTag.cs | 2 +- sdk/dotnet/IncidentWorkflowTrigger.cs | 18 ++ .../IncidentWorkflowTriggerPermissionsArgs.cs | 32 ++++ ...cidentWorkflowTriggerPermissionsGetArgs.cs | 32 ++++ .../IncidentWorkflowTriggerPermissions.cs | 35 ++++ sdk/go/pagerduty/extension.go | 6 +- sdk/go/pagerduty/getExtensionSchema.go | 4 +- sdk/go/pagerduty/getTag.go | 4 +- sdk/go/pagerduty/incidentWorkflowTrigger.go | 15 ++ sdk/go/pagerduty/pulumiTypes.go | 160 ++++++++++++++++++ .../java/com/pulumi/pagerduty/Extension.java | 6 +- .../pagerduty/IncidentWorkflowTrigger.java | 15 ++ .../IncidentWorkflowTriggerArgs.java | 38 +++++ ...ncidentWorkflowTriggerPermissionsArgs.java | 121 +++++++++++++ .../inputs/IncidentWorkflowTriggerState.java | 38 +++++ .../outputs/GetExtensionSchemaResult.java | 4 +- .../pagerduty/outputs/GetTagResult.java | 4 +- .../IncidentWorkflowTriggerPermissions.java | 79 +++++++++ sdk/nodejs/extension.ts | 2 +- sdk/nodejs/getExtensionSchema.ts | 2 +- sdk/nodejs/getTag.ts | 2 +- sdk/nodejs/incidentWorkflowTrigger.ts | 16 ++ sdk/nodejs/types/input.ts | 11 ++ sdk/nodejs/types/output.ts | 11 ++ sdk/python/pulumi_pagerduty/_inputs.py | 40 +++++ sdk/python/pulumi_pagerduty/extension.py | 2 +- .../pulumi_pagerduty/get_extension_schema.py | 2 +- sdk/python/pulumi_pagerduty/get_tag.py | 2 +- .../incident_workflow_trigger.py | 49 ++++++ sdk/python/pulumi_pagerduty/outputs.py | 49 ++++++ upstream | 2 +- 40 files changed, 984 insertions(+), 82 deletions(-) create mode 100644 patches/0003-more-replaces.patch create mode 100644 sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsArgs.cs create mode 100644 sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsGetArgs.cs create mode 100644 sdk/dotnet/Outputs/IncidentWorkflowTriggerPermissions.cs create mode 100644 sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerPermissionsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/pagerduty/outputs/IncidentWorkflowTriggerPermissions.java diff --git a/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch b/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch index 6da0df67..86ff54ac 100644 --- a/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch +++ b/patches/0001-fixup-update-CHANGELOG.md-v3.8.1.patch @@ -1,11 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ian Wahbe -Date: Wed, 21 Feb 2024 20:32:54 +0100 -Subject: [PATCH 1/2] fixup! update CHANGELOG.md v3.8.1 +From: Venelin +Date: Fri, 10 May 2024 18:03:03 +0100 +Subject: [PATCH] fixup! update CHANGELOG.md v3.8.1 diff --git a/go.mod b/go.mod -index 967b43a7..5e116702 100644 +index f30298c2..7d3d0c2e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ @@ -45,7 +45,7 @@ index 4b0dcc1e..923000cd 100644 func timeToUTC(v string) (time.Time, error) { diff --git a/pagerdutyplugin/config.go b/pagerdutyplugin/config.go -index 5b9fee0e..d4963b1f 100644 +index 48b05a47..7cb7f247 100644 --- a/pagerdutyplugin/config.go +++ b/pagerdutyplugin/config.go @@ -11,9 +11,10 @@ import ( @@ -61,14 +61,21 @@ index 5b9fee0e..d4963b1f 100644 // Config defines the configuration options for the PagerDuty client diff --git a/pagerdutyplugin/provider_test.go b/pagerdutyplugin/provider_test.go -index 66e63338..23c6b8ff 100644 +index ea839e2b..7c589313 100644 --- a/pagerdutyplugin/provider_test.go +++ b/pagerdutyplugin/provider_test.go -@@ -11,7 +11,7 @@ import ( - "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/terraform" +@@ -6,13 +6,14 @@ import ( + "testing" + "time" - pd "github.com/PagerDuty/terraform-provider-pagerduty/pagerduty" + "github.com/PagerDuty/terraform-provider-pagerduty/util" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" ++ + pd "github.com/PagerDuty/terraform-provider-pagerduty/v3/pagerduty" ) diff --git a/patches/0002-versioned-util-package-for-more-resources.patch b/patches/0002-versioned-util-package-for-more-resources.patch index c240a8a1..cabfe163 100644 --- a/patches/0002-versioned-util-package-for-more-resources.patch +++ b/patches/0002-versioned-util-package-for-more-resources.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Fri, 22 Mar 2024 10:23:37 -0700 -Subject: [PATCH 2/2] versioned util package for more resources +Subject: [PATCH] versioned util package for more resources diff --git a/pagerduty/resource_pagerduty_schedule.go b/pagerduty/resource_pagerduty_schedule.go @@ -18,7 +18,7 @@ index 11a75167..e3dedc0d 100644 "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" diff --git a/pagerduty/resource_pagerduty_service.go b/pagerduty/resource_pagerduty_service.go -index 41b51a07..f89dd98f 100644 +index 17224545..608eee66 100644 --- a/pagerduty/resource_pagerduty_service.go +++ b/pagerduty/resource_pagerduty_service.go @@ -8,7 +8,7 @@ import ( diff --git a/patches/0003-more-replaces.patch b/patches/0003-more-replaces.patch new file mode 100644 index 00000000..00c4b46b --- /dev/null +++ b/patches/0003-more-replaces.patch @@ -0,0 +1,110 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Venelin +Date: Fri, 10 May 2024 18:16:24 +0100 +Subject: [PATCH] more replaces + + +diff --git a/pagerdutyplugin/data_source_pagerduty_extension_schema.go b/pagerdutyplugin/data_source_pagerduty_extension_schema.go +index 3f0db919..b5be392e 100644 +--- a/pagerdutyplugin/data_source_pagerduty_extension_schema.go ++++ b/pagerdutyplugin/data_source_pagerduty_extension_schema.go +@@ -8,7 +8,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/path" +diff --git a/pagerdutyplugin/data_source_pagerduty_tag.go b/pagerdutyplugin/data_source_pagerduty_tag.go +index f162bb49..c25f9c7f 100644 +--- a/pagerdutyplugin/data_source_pagerduty_tag.go ++++ b/pagerdutyplugin/data_source_pagerduty_tag.go +@@ -7,7 +7,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/path" +diff --git a/pagerdutyplugin/provider_test.go b/pagerdutyplugin/provider_test.go +index 7c589313..9c74b115 100644 +--- a/pagerdutyplugin/provider_test.go ++++ b/pagerdutyplugin/provider_test.go +@@ -6,7 +6,7 @@ import ( + "testing" + "time" + +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" +diff --git a/pagerdutyplugin/resource_pagerduty_extension.go b/pagerdutyplugin/resource_pagerduty_extension.go +index 476653e0..05d1f62b 100644 +--- a/pagerdutyplugin/resource_pagerduty_extension.go ++++ b/pagerdutyplugin/resource_pagerduty_extension.go +@@ -8,7 +8,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/path" +diff --git a/pagerdutyplugin/resource_pagerduty_extension_servicenow.go b/pagerdutyplugin/resource_pagerduty_extension_servicenow.go +index 7abf7e4e..6bdf5b40 100644 +--- a/pagerdutyplugin/resource_pagerduty_extension_servicenow.go ++++ b/pagerdutyplugin/resource_pagerduty_extension_servicenow.go +@@ -8,7 +8,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/diag" +diff --git a/pagerdutyplugin/resource_pagerduty_extension_test.go b/pagerdutyplugin/resource_pagerduty_extension_test.go +index c63934d5..49f6d726 100644 +--- a/pagerdutyplugin/resource_pagerduty_extension_test.go ++++ b/pagerdutyplugin/resource_pagerduty_extension_test.go +@@ -8,7 +8,7 @@ import ( + "testing" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" +diff --git a/pagerdutyplugin/resource_pagerduty_tag.go b/pagerdutyplugin/resource_pagerduty_tag.go +index 6a9d75f3..a332f0e1 100644 +--- a/pagerdutyplugin/resource_pagerduty_tag.go ++++ b/pagerdutyplugin/resource_pagerduty_tag.go +@@ -7,7 +7,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" +diff --git a/pagerdutyplugin/resource_pagerduty_tag_assignment.go b/pagerdutyplugin/resource_pagerduty_tag_assignment.go +index 0acc1538..5fbb7578 100644 +--- a/pagerdutyplugin/resource_pagerduty_tag_assignment.go ++++ b/pagerdutyplugin/resource_pagerduty_tag_assignment.go +@@ -8,7 +8,7 @@ import ( + "time" + + "github.com/PagerDuty/go-pagerduty" +- "github.com/PagerDuty/terraform-provider-pagerduty/util" ++ "github.com/PagerDuty/terraform-provider-pagerduty/v3/util" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/resource" diff --git a/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json b/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json index 65344245..2639cebf 100644 --- a/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-pagerduty/bridge-metadata.json @@ -450,6 +450,9 @@ "current": "pagerduty:index/incidentWorkflowTrigger:IncidentWorkflowTrigger", "majorVersion": 4, "fields": { + "permissions": { + "maxItemsOne": true + }, "services": { "maxItemsOne": false } @@ -1159,8 +1162,8 @@ "pagerduty:index/eventOrchestrationServiceCacheVariable:EventOrchestrationServiceCacheVariable": 0, "pagerduty:index/eventOrchestrationUnrouted:EventOrchestrationUnrouted": 0, "pagerduty:index/eventRule:EventRule": 0, - "pagerduty:index/extension:Extension": 0, - "pagerduty:index/extensionServiceNow:ExtensionServiceNow": 0, + "pagerduty:index/extension:Extension": 1, + "pagerduty:index/extensionServiceNow:ExtensionServiceNow": 1, "pagerduty:index/incidentCustomField:IncidentCustomField": 0, "pagerduty:index/incidentCustomFieldOption:IncidentCustomFieldOption": 0, "pagerduty:index/incidentWorkflow:IncidentWorkflow": 0, @@ -1175,8 +1178,8 @@ "pagerduty:index/serviceEventRule:ServiceEventRule": 0, "pagerduty:index/serviceIntegration:ServiceIntegration": 0, "pagerduty:index/slackConnection:SlackConnection": 0, - "pagerduty:index/tag:Tag": 0, - "pagerduty:index/tagAssignment:TagAssignment": 0, + "pagerduty:index/tag:Tag": 1, + "pagerduty:index/tagAssignment:TagAssignment": 1, "pagerduty:index/team:Team": 0, "pagerduty:index/teamMembership:TeamMembership": 0, "pagerduty:index/user:User": 0, @@ -1194,7 +1197,7 @@ "pagerduty:index/getEventOrchestrationIntegration:getEventOrchestrationIntegration": 0, "pagerduty:index/getEventOrchestrationServiceCacheVariable:getEventOrchestrationServiceCacheVariable": 0, "pagerduty:index/getEventOrchestrations:getEventOrchestrations": 0, - "pagerduty:index/getExtensionSchema:getExtensionSchema": 0, + "pagerduty:index/getExtensionSchema:getExtensionSchema": 1, "pagerduty:index/getIncidentCustomField:getIncidentCustomField": 0, "pagerduty:index/getIncidentWorkflow:getIncidentWorkflow": 0, "pagerduty:index/getLicense:getLicense": 0, @@ -1207,7 +1210,7 @@ "pagerduty:index/getStandards:getStandards": 1, "pagerduty:index/getStandardsResourceScores:getStandardsResourceScores": 1, "pagerduty:index/getStandardsResourcesScores:getStandardsResourcesScores": 1, - "pagerduty:index/getTag:getTag": 0, + "pagerduty:index/getTag:getTag": 1, "pagerduty:index/getTeam:getTeam": 0, "pagerduty:index/getTeamMembers:getTeamMembers": 0, "pagerduty:index/getUser:getUser": 0, diff --git a/provider/cmd/pulumi-resource-pagerduty/schema.json b/provider/cmd/pulumi-resource-pagerduty/schema.json index 39ae25ce..eb68ecb0 100644 --- a/provider/cmd/pulumi-resource-pagerduty/schema.json +++ b/provider/cmd/pulumi-resource-pagerduty/schema.json @@ -1777,6 +1777,26 @@ } } }, + "pagerduty:index/IncidentWorkflowTriggerPermissions:IncidentWorkflowTriggerPermissions": { + "properties": { + "restricted": { + "type": "boolean", + "description": "If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers.\n" + }, + "teamId": { + "type": "string", + "description": "The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`.\n" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "restricted" + ] + } + } + }, "pagerduty:index/ProviderUseAppOauthScopedToken:ProviderUseAppOauthScopedToken": { "properties": { "pdClientId": { @@ -5193,6 +5213,7 @@ } }, "required": [ + "config", "extensionObjects", "extensionSchema", "htmlUrl", @@ -5212,12 +5233,10 @@ "type": "array", "items": { "type": "string" - }, - "willReplaceOnChanges": true + } }, "extensionSchema": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "name": { "type": "string" @@ -5244,12 +5263,10 @@ "type": "array", "items": { "type": "string" - }, - "willReplaceOnChanges": true + } }, "extensionSchema": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "htmlUrl": { "type": "string", @@ -5340,12 +5357,10 @@ "type": "array", "items": { "type": "string" - }, - "willReplaceOnChanges": true + } }, "extensionSchema": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "name": { "type": "string" @@ -5397,12 +5412,10 @@ "type": "array", "items": { "type": "string" - }, - "willReplaceOnChanges": true + } }, "extensionSchema": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "htmlUrl": { "type": "string", @@ -5658,6 +5671,10 @@ "type": "string", "description": "A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire.\n" }, + "permissions": { + "$ref": "#/types/pagerduty:index/IncidentWorkflowTriggerPermissions:IncidentWorkflowTriggerPermissions", + "description": "Indicates who can start this Trigger. Applicable only to `manual`-type triggers.\n" + }, "services": { "type": "array", "items": { @@ -5679,6 +5696,7 @@ } }, "required": [ + "permissions", "subscribedToAllServices", "type", "workflow" @@ -5688,6 +5706,10 @@ "type": "string", "description": "A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire.\n" }, + "permissions": { + "$ref": "#/types/pagerduty:index/IncidentWorkflowTriggerPermissions:IncidentWorkflowTriggerPermissions", + "description": "Indicates who can start this Trigger. Applicable only to `manual`-type triggers.\n" + }, "services": { "type": "array", "items": { @@ -5721,6 +5743,10 @@ "type": "string", "description": "A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire.\n" }, + "permissions": { + "$ref": "#/types/pagerduty:index/IncidentWorkflowTriggerPermissions:IncidentWorkflowTriggerPermissions", + "description": "Indicates who can start this Trigger. Applicable only to `manual`-type triggers.\n" + }, "services": { "type": "array", "items": { @@ -6948,8 +6974,7 @@ ], "inputProperties": { "label": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" } }, "requiredInputs": [ @@ -6963,8 +6988,7 @@ "description": "URL at which the entity is uniquely displayed in the Web app.\n" }, "label": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "summary": { "type": "string", @@ -6994,16 +7018,13 @@ ], "inputProperties": { "entityId": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "entityType": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "tagId": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" } }, "requiredInputs": [ @@ -7015,16 +7036,13 @@ "description": "Input properties used for looking up and filtering TagAssignment resources.\n", "properties": { "entityId": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "entityType": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" }, "tagId": { - "type": "string", - "willReplaceOnChanges": true + "type": "string" } }, "type": "object" @@ -8126,7 +8144,7 @@ "description": "A collection of values returned by getExtensionSchema.\n", "properties": { "id": { - "description": "The provider-assigned unique ID for this managed resource.\n", + "description": "The ID of the found extension vendor.\n", "type": "string" }, "name": { @@ -8139,9 +8157,9 @@ } }, "required": [ + "id", "name", - "type", - "id" + "type" ], "type": "object" } @@ -8786,7 +8804,7 @@ "description": "A collection of values returned by getTag.\n", "properties": { "id": { - "description": "The provider-assigned unique ID for this managed resource.\n", + "description": "The ID of the found team.\n", "type": "string" }, "label": { @@ -8794,8 +8812,8 @@ } }, "required": [ - "label", - "id" + "id", + "label" ], "type": "object" } diff --git a/provider/go.mod b/provider/go.mod index 7cc45d0b..7425e09b 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -104,6 +104,7 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect @@ -129,17 +130,19 @@ require ( github.com/hashicorp/terraform-exec v0.20.0 // indirect github.com/hashicorp/terraform-json v0.21.0 // indirect github.com/hashicorp/terraform-plugin-framework v1.8.0 // indirect + github.com/hashicorp/terraform-plugin-framework-jsontypes v0.1.0 // indirect github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 // indirect github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-plugin-mux v0.16.0 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect + github.com/hashicorp/terraform-plugin-testing v1.6.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/vault/api v1.8.2 // indirect github.com/hashicorp/vault/sdk v0.6.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/heimweh/go-pagerduty v0.0.0-20240403153232-5876af2ce24a // indirect + github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/imdario/mergo v0.3.15 // indirect diff --git a/provider/go.sum b/provider/go.sum index 57361a30..fc1a2880 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2252,6 +2252,8 @@ github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRy github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= github.com/hashicorp/terraform-plugin-framework v1.8.0 h1:P07qy8RKLcoBkCrY2RHJer5AEvJnDuXomBgou6fD8kI= github.com/hashicorp/terraform-plugin-framework v1.8.0/go.mod h1:/CpTukO88PcL/62noU7cuyaSJ4Rsim+A/pa+3rUVufY= +github.com/hashicorp/terraform-plugin-framework-jsontypes v0.1.0 h1:b8vZYB/SkXJT4YPbT3trzE6oJ7dPyMy68+9dEDKsJjE= +github.com/hashicorp/terraform-plugin-framework-jsontypes v0.1.0/go.mod h1:tP9BC3icoXBz72evMS5UTFvi98CiKhPdXF6yLs1wS8A= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= @@ -2282,8 +2284,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/heimweh/go-pagerduty v0.0.0-20240403153232-5876af2ce24a h1:upvfy2kYdl/poYpITYmq6ZqJb5mu9zHm4V0YeXlyNOM= -github.com/heimweh/go-pagerduty v0.0.0-20240403153232-5876af2ce24a/go.mod h1:r59w5iyN01Qvi734yA5hZldbSeJJmsJzee/1kQ/MK7s= +github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715 h1:DbdS2LIPkhsqgRcQzOAux0RpTJSH8VYOrN4rZZgznak= +github.com/heimweh/go-pagerduty v0.0.0-20240503143637-3459408ac715/go.mod h1:r59w5iyN01Qvi734yA5hZldbSeJJmsJzee/1kQ/MK7s= github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= github.com/hetznercloud/hcloud-go v1.35.0/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= github.com/hexops/autogold v1.3.0 h1:IEtGNPxBeBu8RMn8eKWh/Ll9dVNgSnJ7bp/qHgMQ14o= diff --git a/sdk/dotnet/Extension.cs b/sdk/dotnet/Extension.cs index 0a5df016..120d1273 100644 --- a/sdk/dotnet/Extension.cs +++ b/sdk/dotnet/Extension.cs @@ -98,7 +98,7 @@ namespace Pulumi.Pagerduty public partial class Extension : global::Pulumi.CustomResource { [Output("config")] - public Output Config { get; private set; } = null!; + public Output Config { get; private set; } = null!; [Output("endpointUrl")] public Output EndpointUrl { get; private set; } = null!; diff --git a/sdk/dotnet/GetExtensionSchema.cs b/sdk/dotnet/GetExtensionSchema.cs index e708bc65..0dd95919 100644 --- a/sdk/dotnet/GetExtensionSchema.cs +++ b/sdk/dotnet/GetExtensionSchema.cs @@ -194,7 +194,7 @@ public GetExtensionSchemaInvokeArgs() public sealed class GetExtensionSchemaResult { /// - /// The provider-assigned unique ID for this managed resource. + /// The ID of the found extension vendor. /// public readonly string Id; /// diff --git a/sdk/dotnet/GetTag.cs b/sdk/dotnet/GetTag.cs index 88307284..b638e94c 100644 --- a/sdk/dotnet/GetTag.cs +++ b/sdk/dotnet/GetTag.cs @@ -118,7 +118,7 @@ public GetTagInvokeArgs() public sealed class GetTagResult { /// - /// The provider-assigned unique ID for this managed resource. + /// The ID of the found team. /// public readonly string Id; public readonly string Label; diff --git a/sdk/dotnet/IncidentWorkflowTrigger.cs b/sdk/dotnet/IncidentWorkflowTrigger.cs index b39faf1d..a6a1f6e6 100644 --- a/sdk/dotnet/IncidentWorkflowTrigger.cs +++ b/sdk/dotnet/IncidentWorkflowTrigger.cs @@ -96,6 +96,12 @@ public partial class IncidentWorkflowTrigger : global::Pulumi.CustomResource [Output("condition")] public Output Condition { get; private set; } = null!; + /// + /// Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + /// + [Output("permissions")] + public Output Permissions { get; private set; } = null!; + /// /// A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. /// @@ -172,6 +178,12 @@ public sealed class IncidentWorkflowTriggerArgs : global::Pulumi.ResourceArgs [Input("condition")] public Input? Condition { get; set; } + /// + /// Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + /// + [Input("permissions")] + public Input? Permissions { get; set; } + [Input("services")] private InputList? _services; @@ -216,6 +228,12 @@ public sealed class IncidentWorkflowTriggerState : global::Pulumi.ResourceArgs [Input("condition")] public Input? Condition { get; set; } + /// + /// Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + /// + [Input("permissions")] + public Input? Permissions { get; set; } + [Input("services")] private InputList? _services; diff --git a/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsArgs.cs b/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsArgs.cs new file mode 100644 index 00000000..e01c2dfe --- /dev/null +++ b/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsArgs.cs @@ -0,0 +1,32 @@ +// *** 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; + +namespace Pulumi.Pagerduty.Inputs +{ + + public sealed class IncidentWorkflowTriggerPermissionsArgs : global::Pulumi.ResourceArgs + { + /// + /// If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + /// + [Input("restricted")] + public Input? Restricted { get; set; } + + /// + /// The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + /// + [Input("teamId")] + public Input? TeamId { get; set; } + + public IncidentWorkflowTriggerPermissionsArgs() + { + } + public static new IncidentWorkflowTriggerPermissionsArgs Empty => new IncidentWorkflowTriggerPermissionsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsGetArgs.cs b/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsGetArgs.cs new file mode 100644 index 00000000..6e382b22 --- /dev/null +++ b/sdk/dotnet/Inputs/IncidentWorkflowTriggerPermissionsGetArgs.cs @@ -0,0 +1,32 @@ +// *** 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; + +namespace Pulumi.Pagerduty.Inputs +{ + + public sealed class IncidentWorkflowTriggerPermissionsGetArgs : global::Pulumi.ResourceArgs + { + /// + /// If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + /// + [Input("restricted")] + public Input? Restricted { get; set; } + + /// + /// The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + /// + [Input("teamId")] + public Input? TeamId { get; set; } + + public IncidentWorkflowTriggerPermissionsGetArgs() + { + } + public static new IncidentWorkflowTriggerPermissionsGetArgs Empty => new IncidentWorkflowTriggerPermissionsGetArgs(); + } +} diff --git a/sdk/dotnet/Outputs/IncidentWorkflowTriggerPermissions.cs b/sdk/dotnet/Outputs/IncidentWorkflowTriggerPermissions.cs new file mode 100644 index 00000000..c661ca4e --- /dev/null +++ b/sdk/dotnet/Outputs/IncidentWorkflowTriggerPermissions.cs @@ -0,0 +1,35 @@ +// *** 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; + +namespace Pulumi.Pagerduty.Outputs +{ + + [OutputType] + public sealed class IncidentWorkflowTriggerPermissions + { + /// + /// If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + /// + public readonly bool? Restricted; + /// + /// The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + /// + public readonly string? TeamId; + + [OutputConstructor] + private IncidentWorkflowTriggerPermissions( + bool? restricted, + + string? teamId) + { + Restricted = restricted; + TeamId = teamId; + } + } +} diff --git a/sdk/go/pagerduty/extension.go b/sdk/go/pagerduty/extension.go index 5301e648..bec5163e 100644 --- a/sdk/go/pagerduty/extension.go +++ b/sdk/go/pagerduty/extension.go @@ -107,7 +107,7 @@ import ( type Extension struct { pulumi.CustomResourceState - Config pulumi.StringPtrOutput `pulumi:"config"` + Config pulumi.StringOutput `pulumi:"config"` EndpointUrl pulumi.StringPtrOutput `pulumi:"endpointUrl"` ExtensionObjects pulumi.StringArrayOutput `pulumi:"extensionObjects"` ExtensionSchema pulumi.StringOutput `pulumi:"extensionSchema"` @@ -294,8 +294,8 @@ func (o ExtensionOutput) ToExtensionOutputWithContext(ctx context.Context) Exten return o } -func (o ExtensionOutput) Config() pulumi.StringPtrOutput { - return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.Config }).(pulumi.StringPtrOutput) +func (o ExtensionOutput) Config() pulumi.StringOutput { + return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Config }).(pulumi.StringOutput) } func (o ExtensionOutput) EndpointUrl() pulumi.StringPtrOutput { diff --git a/sdk/go/pagerduty/getExtensionSchema.go b/sdk/go/pagerduty/getExtensionSchema.go index edc1b912..1c0a2589 100644 --- a/sdk/go/pagerduty/getExtensionSchema.go +++ b/sdk/go/pagerduty/getExtensionSchema.go @@ -104,7 +104,7 @@ type GetExtensionSchemaArgs struct { // A collection of values returned by getExtensionSchema. type GetExtensionSchemaResult struct { - // The provider-assigned unique ID for this managed resource. + // The ID of the found extension vendor. Id string `pulumi:"id"` // The short name of the found extension vendor. Name string `pulumi:"name"` @@ -150,7 +150,7 @@ func (o GetExtensionSchemaResultOutput) ToGetExtensionSchemaResultOutputWithCont return o } -// The provider-assigned unique ID for this managed resource. +// The ID of the found extension vendor. func (o GetExtensionSchemaResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetExtensionSchemaResult) string { return v.Id }).(pulumi.StringOutput) } diff --git a/sdk/go/pagerduty/getTag.go b/sdk/go/pagerduty/getTag.go index fdba72b3..6b223f24 100644 --- a/sdk/go/pagerduty/getTag.go +++ b/sdk/go/pagerduty/getTag.go @@ -70,7 +70,7 @@ type LookupTagArgs struct { // A collection of values returned by getTag. type LookupTagResult struct { - // The provider-assigned unique ID for this managed resource. + // The ID of the found team. Id string `pulumi:"id"` Label string `pulumi:"label"` } @@ -113,7 +113,7 @@ func (o LookupTagResultOutput) ToLookupTagResultOutputWithContext(ctx context.Co return o } -// The provider-assigned unique ID for this managed resource. +// The ID of the found team. func (o LookupTagResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTagResult) string { return v.Id }).(pulumi.StringOutput) } diff --git a/sdk/go/pagerduty/incidentWorkflowTrigger.go b/sdk/go/pagerduty/incidentWorkflowTrigger.go index 9f4c7bc6..1abff77b 100644 --- a/sdk/go/pagerduty/incidentWorkflowTrigger.go +++ b/sdk/go/pagerduty/incidentWorkflowTrigger.go @@ -99,6 +99,8 @@ type IncidentWorkflowTrigger struct { // A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. Condition pulumi.StringPtrOutput `pulumi:"condition"` + // Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + Permissions IncidentWorkflowTriggerPermissionsOutput `pulumi:"permissions"` // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. Services pulumi.StringArrayOutput `pulumi:"services"` // Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. @@ -150,6 +152,8 @@ func GetIncidentWorkflowTrigger(ctx *pulumi.Context, type incidentWorkflowTriggerState struct { // A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. Condition *string `pulumi:"condition"` + // Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + Permissions *IncidentWorkflowTriggerPermissions `pulumi:"permissions"` // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. Services []string `pulumi:"services"` // Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. @@ -163,6 +167,8 @@ type incidentWorkflowTriggerState struct { type IncidentWorkflowTriggerState struct { // A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. Condition pulumi.StringPtrInput + // Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + Permissions IncidentWorkflowTriggerPermissionsPtrInput // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. Services pulumi.StringArrayInput // Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. @@ -180,6 +186,8 @@ func (IncidentWorkflowTriggerState) ElementType() reflect.Type { type incidentWorkflowTriggerArgs struct { // A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. Condition *string `pulumi:"condition"` + // Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + Permissions *IncidentWorkflowTriggerPermissions `pulumi:"permissions"` // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. Services []string `pulumi:"services"` // Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. @@ -194,6 +202,8 @@ type incidentWorkflowTriggerArgs struct { type IncidentWorkflowTriggerArgs struct { // A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. Condition pulumi.StringPtrInput + // Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + Permissions IncidentWorkflowTriggerPermissionsPtrInput // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. Services pulumi.StringArrayInput // Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. @@ -296,6 +306,11 @@ func (o IncidentWorkflowTriggerOutput) Condition() pulumi.StringPtrOutput { return o.ApplyT(func(v *IncidentWorkflowTrigger) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput) } +// Indicates who can start this Trigger. Applicable only to `manual`-type triggers. +func (o IncidentWorkflowTriggerOutput) Permissions() IncidentWorkflowTriggerPermissionsOutput { + return o.ApplyT(func(v *IncidentWorkflowTrigger) IncidentWorkflowTriggerPermissionsOutput { return v.Permissions }).(IncidentWorkflowTriggerPermissionsOutput) +} + // A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. func (o IncidentWorkflowTriggerOutput) Services() pulumi.StringArrayOutput { return o.ApplyT(func(v *IncidentWorkflowTrigger) pulumi.StringArrayOutput { return v.Services }).(pulumi.StringArrayOutput) diff --git a/sdk/go/pagerduty/pulumiTypes.go b/sdk/go/pagerduty/pulumiTypes.go index e1483ded..efe3cc68 100644 --- a/sdk/go/pagerduty/pulumiTypes.go +++ b/sdk/go/pagerduty/pulumiTypes.go @@ -9295,6 +9295,162 @@ func (o IncidentWorkflowStepInputTypeArrayOutput) Index(i pulumi.IntInput) Incid }).(IncidentWorkflowStepInputTypeOutput) } +type IncidentWorkflowTriggerPermissions struct { + // If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + Restricted *bool `pulumi:"restricted"` + // The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + TeamId *string `pulumi:"teamId"` +} + +// IncidentWorkflowTriggerPermissionsInput is an input type that accepts IncidentWorkflowTriggerPermissionsArgs and IncidentWorkflowTriggerPermissionsOutput values. +// You can construct a concrete instance of `IncidentWorkflowTriggerPermissionsInput` via: +// +// IncidentWorkflowTriggerPermissionsArgs{...} +type IncidentWorkflowTriggerPermissionsInput interface { + pulumi.Input + + ToIncidentWorkflowTriggerPermissionsOutput() IncidentWorkflowTriggerPermissionsOutput + ToIncidentWorkflowTriggerPermissionsOutputWithContext(context.Context) IncidentWorkflowTriggerPermissionsOutput +} + +type IncidentWorkflowTriggerPermissionsArgs struct { + // If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + Restricted pulumi.BoolPtrInput `pulumi:"restricted"` + // The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + TeamId pulumi.StringPtrInput `pulumi:"teamId"` +} + +func (IncidentWorkflowTriggerPermissionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*IncidentWorkflowTriggerPermissions)(nil)).Elem() +} + +func (i IncidentWorkflowTriggerPermissionsArgs) ToIncidentWorkflowTriggerPermissionsOutput() IncidentWorkflowTriggerPermissionsOutput { + return i.ToIncidentWorkflowTriggerPermissionsOutputWithContext(context.Background()) +} + +func (i IncidentWorkflowTriggerPermissionsArgs) ToIncidentWorkflowTriggerPermissionsOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(IncidentWorkflowTriggerPermissionsOutput) +} + +func (i IncidentWorkflowTriggerPermissionsArgs) ToIncidentWorkflowTriggerPermissionsPtrOutput() IncidentWorkflowTriggerPermissionsPtrOutput { + return i.ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(context.Background()) +} + +func (i IncidentWorkflowTriggerPermissionsArgs) ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IncidentWorkflowTriggerPermissionsOutput).ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(ctx) +} + +// IncidentWorkflowTriggerPermissionsPtrInput is an input type that accepts IncidentWorkflowTriggerPermissionsArgs, IncidentWorkflowTriggerPermissionsPtr and IncidentWorkflowTriggerPermissionsPtrOutput values. +// You can construct a concrete instance of `IncidentWorkflowTriggerPermissionsPtrInput` via: +// +// IncidentWorkflowTriggerPermissionsArgs{...} +// +// or: +// +// nil +type IncidentWorkflowTriggerPermissionsPtrInput interface { + pulumi.Input + + ToIncidentWorkflowTriggerPermissionsPtrOutput() IncidentWorkflowTriggerPermissionsPtrOutput + ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(context.Context) IncidentWorkflowTriggerPermissionsPtrOutput +} + +type incidentWorkflowTriggerPermissionsPtrType IncidentWorkflowTriggerPermissionsArgs + +func IncidentWorkflowTriggerPermissionsPtr(v *IncidentWorkflowTriggerPermissionsArgs) IncidentWorkflowTriggerPermissionsPtrInput { + return (*incidentWorkflowTriggerPermissionsPtrType)(v) +} + +func (*incidentWorkflowTriggerPermissionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**IncidentWorkflowTriggerPermissions)(nil)).Elem() +} + +func (i *incidentWorkflowTriggerPermissionsPtrType) ToIncidentWorkflowTriggerPermissionsPtrOutput() IncidentWorkflowTriggerPermissionsPtrOutput { + return i.ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(context.Background()) +} + +func (i *incidentWorkflowTriggerPermissionsPtrType) ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IncidentWorkflowTriggerPermissionsPtrOutput) +} + +type IncidentWorkflowTriggerPermissionsOutput struct{ *pulumi.OutputState } + +func (IncidentWorkflowTriggerPermissionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*IncidentWorkflowTriggerPermissions)(nil)).Elem() +} + +func (o IncidentWorkflowTriggerPermissionsOutput) ToIncidentWorkflowTriggerPermissionsOutput() IncidentWorkflowTriggerPermissionsOutput { + return o +} + +func (o IncidentWorkflowTriggerPermissionsOutput) ToIncidentWorkflowTriggerPermissionsOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsOutput { + return o +} + +func (o IncidentWorkflowTriggerPermissionsOutput) ToIncidentWorkflowTriggerPermissionsPtrOutput() IncidentWorkflowTriggerPermissionsPtrOutput { + return o.ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(context.Background()) +} + +func (o IncidentWorkflowTriggerPermissionsOutput) ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v IncidentWorkflowTriggerPermissions) *IncidentWorkflowTriggerPermissions { + return &v + }).(IncidentWorkflowTriggerPermissionsPtrOutput) +} + +// If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. +func (o IncidentWorkflowTriggerPermissionsOutput) Restricted() pulumi.BoolPtrOutput { + return o.ApplyT(func(v IncidentWorkflowTriggerPermissions) *bool { return v.Restricted }).(pulumi.BoolPtrOutput) +} + +// The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. +func (o IncidentWorkflowTriggerPermissionsOutput) TeamId() pulumi.StringPtrOutput { + return o.ApplyT(func(v IncidentWorkflowTriggerPermissions) *string { return v.TeamId }).(pulumi.StringPtrOutput) +} + +type IncidentWorkflowTriggerPermissionsPtrOutput struct{ *pulumi.OutputState } + +func (IncidentWorkflowTriggerPermissionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**IncidentWorkflowTriggerPermissions)(nil)).Elem() +} + +func (o IncidentWorkflowTriggerPermissionsPtrOutput) ToIncidentWorkflowTriggerPermissionsPtrOutput() IncidentWorkflowTriggerPermissionsPtrOutput { + return o +} + +func (o IncidentWorkflowTriggerPermissionsPtrOutput) ToIncidentWorkflowTriggerPermissionsPtrOutputWithContext(ctx context.Context) IncidentWorkflowTriggerPermissionsPtrOutput { + return o +} + +func (o IncidentWorkflowTriggerPermissionsPtrOutput) Elem() IncidentWorkflowTriggerPermissionsOutput { + return o.ApplyT(func(v *IncidentWorkflowTriggerPermissions) IncidentWorkflowTriggerPermissions { + if v != nil { + return *v + } + var ret IncidentWorkflowTriggerPermissions + return ret + }).(IncidentWorkflowTriggerPermissionsOutput) +} + +// If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. +func (o IncidentWorkflowTriggerPermissionsPtrOutput) Restricted() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *IncidentWorkflowTriggerPermissions) *bool { + if v == nil { + return nil + } + return v.Restricted + }).(pulumi.BoolPtrOutput) +} + +// The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. +func (o IncidentWorkflowTriggerPermissionsPtrOutput) TeamId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IncidentWorkflowTriggerPermissions) *string { + if v == nil { + return nil + } + return v.TeamId + }).(pulumi.StringPtrOutput) +} + type ProviderUseAppOauthScopedToken struct { PdClientId *string `pulumi:"pdClientId"` PdClientSecret *string `pulumi:"pdClientSecret"` @@ -20346,6 +20502,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*IncidentWorkflowStepInlineStepsInputStepInputTypeArrayInput)(nil)).Elem(), IncidentWorkflowStepInlineStepsInputStepInputTypeArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IncidentWorkflowStepInputTypeInput)(nil)).Elem(), IncidentWorkflowStepInputTypeArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*IncidentWorkflowStepInputTypeArrayInput)(nil)).Elem(), IncidentWorkflowStepInputTypeArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*IncidentWorkflowTriggerPermissionsInput)(nil)).Elem(), IncidentWorkflowTriggerPermissionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*IncidentWorkflowTriggerPermissionsPtrInput)(nil)).Elem(), IncidentWorkflowTriggerPermissionsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderUseAppOauthScopedTokenInput)(nil)).Elem(), ProviderUseAppOauthScopedTokenArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderUseAppOauthScopedTokenPtrInput)(nil)).Elem(), ProviderUseAppOauthScopedTokenArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ResponsePlayResponderInput)(nil)).Elem(), ResponsePlayResponderArgs{}) @@ -20655,6 +20813,8 @@ func init() { pulumi.RegisterOutputType(IncidentWorkflowStepInlineStepsInputStepInputTypeArrayOutput{}) pulumi.RegisterOutputType(IncidentWorkflowStepInputTypeOutput{}) pulumi.RegisterOutputType(IncidentWorkflowStepInputTypeArrayOutput{}) + pulumi.RegisterOutputType(IncidentWorkflowTriggerPermissionsOutput{}) + pulumi.RegisterOutputType(IncidentWorkflowTriggerPermissionsPtrOutput{}) pulumi.RegisterOutputType(ProviderUseAppOauthScopedTokenOutput{}) pulumi.RegisterOutputType(ProviderUseAppOauthScopedTokenPtrOutput{}) pulumi.RegisterOutputType(ResponsePlayResponderOutput{}) diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/Extension.java b/sdk/java/src/main/java/com/pulumi/pagerduty/Extension.java index 683cf455..0c141568 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/Extension.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/Extension.java @@ -116,10 +116,10 @@ @ResourceType(type="pagerduty:index/extension:Extension") public class Extension extends com.pulumi.resources.CustomResource { @Export(name="config", refs={String.class}, tree="[0]") - private Output config; + private Output config; - public Output> config() { - return Codegen.optional(this.config); + public Output config() { + return this.config; } @Export(name="endpointUrl", refs={String.class}, tree="[0]") private Output endpointUrl; diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTrigger.java b/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTrigger.java index 6ae5fd86..bc32df68 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTrigger.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTrigger.java @@ -10,6 +10,7 @@ import com.pulumi.pagerduty.IncidentWorkflowTriggerArgs; import com.pulumi.pagerduty.Utilities; import com.pulumi.pagerduty.inputs.IncidentWorkflowTriggerState; +import com.pulumi.pagerduty.outputs.IncidentWorkflowTriggerPermissions; import java.lang.Boolean; import java.lang.String; import java.util.List; @@ -116,6 +117,20 @@ public class IncidentWorkflowTrigger extends com.pulumi.resources.CustomResource public Output> condition() { return Codegen.optional(this.condition); } + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + @Export(name="permissions", refs={IncidentWorkflowTriggerPermissions.class}, tree="[0]") + private Output permissions; + + /** + * @return Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + public Output permissions() { + return this.permissions; + } /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. * diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTriggerArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTriggerArgs.java index 536f83f6..f9c6f612 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTriggerArgs.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/IncidentWorkflowTriggerArgs.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.pagerduty.inputs.IncidentWorkflowTriggerPermissionsArgs; import java.lang.Boolean; import java.lang.String; import java.util.List; @@ -33,6 +34,21 @@ public Optional> condition() { return Optional.ofNullable(this.condition); } + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + @Import(name="permissions") + private @Nullable Output permissions; + + /** + * @return Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + public Optional> permissions() { + return Optional.ofNullable(this.permissions); + } + /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. * @@ -97,6 +113,7 @@ private IncidentWorkflowTriggerArgs() {} private IncidentWorkflowTriggerArgs(IncidentWorkflowTriggerArgs $) { this.condition = $.condition; + this.permissions = $.permissions; this.services = $.services; this.subscribedToAllServices = $.subscribedToAllServices; this.type = $.type; @@ -142,6 +159,27 @@ public Builder condition(String condition) { return condition(Output.of(condition)); } + /** + * @param permissions Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder permissions(@Nullable Output permissions) { + $.permissions = permissions; + return this; + } + + /** + * @param permissions Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder permissions(IncidentWorkflowTriggerPermissionsArgs permissions) { + return permissions(Output.of(permissions)); + } + /** * @param services A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. * diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerPermissionsArgs.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerPermissionsArgs.java new file mode 100644 index 00000000..71cac9ee --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerPermissionsArgs.java @@ -0,0 +1,121 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.pagerduty.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IncidentWorkflowTriggerPermissionsArgs extends com.pulumi.resources.ResourceArgs { + + public static final IncidentWorkflowTriggerPermissionsArgs Empty = new IncidentWorkflowTriggerPermissionsArgs(); + + /** + * If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + @Import(name="restricted") + private @Nullable Output restricted; + + /** + * @return If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + public Optional> restricted() { + return Optional.ofNullable(this.restricted); + } + + /** + * The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + */ + @Import(name="teamId") + private @Nullable Output teamId; + + /** + * @return The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + */ + public Optional> teamId() { + return Optional.ofNullable(this.teamId); + } + + private IncidentWorkflowTriggerPermissionsArgs() {} + + private IncidentWorkflowTriggerPermissionsArgs(IncidentWorkflowTriggerPermissionsArgs $) { + this.restricted = $.restricted; + this.teamId = $.teamId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IncidentWorkflowTriggerPermissionsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IncidentWorkflowTriggerPermissionsArgs $; + + public Builder() { + $ = new IncidentWorkflowTriggerPermissionsArgs(); + } + + public Builder(IncidentWorkflowTriggerPermissionsArgs defaults) { + $ = new IncidentWorkflowTriggerPermissionsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param restricted If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder restricted(@Nullable Output restricted) { + $.restricted = restricted; + return this; + } + + /** + * @param restricted If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder restricted(Boolean restricted) { + return restricted(Output.of(restricted)); + } + + /** + * @param teamId The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + * @return builder + * + */ + public Builder teamId(@Nullable Output teamId) { + $.teamId = teamId; + return this; + } + + /** + * @param teamId The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + * @return builder + * + */ + public Builder teamId(String teamId) { + return teamId(Output.of(teamId)); + } + + public IncidentWorkflowTriggerPermissionsArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerState.java b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerState.java index 95700d14..bd5c4b48 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerState.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/inputs/IncidentWorkflowTriggerState.java @@ -5,6 +5,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; +import com.pulumi.pagerduty.inputs.IncidentWorkflowTriggerPermissionsArgs; import java.lang.Boolean; import java.lang.String; import java.util.List; @@ -32,6 +33,21 @@ public Optional> condition() { return Optional.ofNullable(this.condition); } + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + @Import(name="permissions") + private @Nullable Output permissions; + + /** + * @return Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + public Optional> permissions() { + return Optional.ofNullable(this.permissions); + } + /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. * @@ -96,6 +112,7 @@ private IncidentWorkflowTriggerState() {} private IncidentWorkflowTriggerState(IncidentWorkflowTriggerState $) { this.condition = $.condition; + this.permissions = $.permissions; this.services = $.services; this.subscribedToAllServices = $.subscribedToAllServices; this.type = $.type; @@ -141,6 +158,27 @@ public Builder condition(String condition) { return condition(Output.of(condition)); } + /** + * @param permissions Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder permissions(@Nullable Output permissions) { + $.permissions = permissions; + return this; + } + + /** + * @param permissions Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + * + * @return builder + * + */ + public Builder permissions(IncidentWorkflowTriggerPermissionsArgs permissions) { + return permissions(Output.of(permissions)); + } + /** * @param services A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. * diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetExtensionSchemaResult.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetExtensionSchemaResult.java index a567b1dc..e49ac925 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetExtensionSchemaResult.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetExtensionSchemaResult.java @@ -11,7 +11,7 @@ @CustomType public final class GetExtensionSchemaResult { /** - * @return The provider-assigned unique ID for this managed resource. + * @return The ID of the found extension vendor. * */ private String id; @@ -28,7 +28,7 @@ public final class GetExtensionSchemaResult { private GetExtensionSchemaResult() {} /** - * @return The provider-assigned unique ID for this managed resource. + * @return The ID of the found extension vendor. * */ public String id() { diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetTagResult.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetTagResult.java index bf80ee89..c02f4233 100644 --- a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetTagResult.java +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/GetTagResult.java @@ -11,7 +11,7 @@ @CustomType public final class GetTagResult { /** - * @return The provider-assigned unique ID for this managed resource. + * @return The ID of the found team. * */ private String id; @@ -19,7 +19,7 @@ public final class GetTagResult { private GetTagResult() {} /** - * @return The provider-assigned unique ID for this managed resource. + * @return The ID of the found team. * */ public String id() { diff --git a/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/IncidentWorkflowTriggerPermissions.java b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/IncidentWorkflowTriggerPermissions.java new file mode 100644 index 00000000..65ba6177 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/pagerduty/outputs/IncidentWorkflowTriggerPermissions.java @@ -0,0 +1,79 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.pagerduty.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class IncidentWorkflowTriggerPermissions { + /** + * @return If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + private @Nullable Boolean restricted; + /** + * @return The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + */ + private @Nullable String teamId; + + private IncidentWorkflowTriggerPermissions() {} + /** + * @return If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + * + */ + public Optional restricted() { + return Optional.ofNullable(this.restricted); + } + /** + * @return The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + * + */ + public Optional teamId() { + return Optional.ofNullable(this.teamId); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(IncidentWorkflowTriggerPermissions defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Boolean restricted; + private @Nullable String teamId; + public Builder() {} + public Builder(IncidentWorkflowTriggerPermissions defaults) { + Objects.requireNonNull(defaults); + this.restricted = defaults.restricted; + this.teamId = defaults.teamId; + } + + @CustomType.Setter + public Builder restricted(@Nullable Boolean restricted) { + + this.restricted = restricted; + return this; + } + @CustomType.Setter + public Builder teamId(@Nullable String teamId) { + + this.teamId = teamId; + return this; + } + public IncidentWorkflowTriggerPermissions build() { + final var _resultValue = new IncidentWorkflowTriggerPermissions(); + _resultValue.restricted = restricted; + _resultValue.teamId = teamId; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/extension.ts b/sdk/nodejs/extension.ts index 4423f2a1..5d3752b6 100644 --- a/sdk/nodejs/extension.ts +++ b/sdk/nodejs/extension.ts @@ -91,7 +91,7 @@ export class Extension extends pulumi.CustomResource { return obj['__pulumiType'] === Extension.__pulumiType; } - public readonly config!: pulumi.Output; + public readonly config!: pulumi.Output; public readonly endpointUrl!: pulumi.Output; public readonly extensionObjects!: pulumi.Output; public readonly extensionSchema!: pulumi.Output; diff --git a/sdk/nodejs/getExtensionSchema.ts b/sdk/nodejs/getExtensionSchema.ts index d89a7640..590643c3 100644 --- a/sdk/nodejs/getExtensionSchema.ts +++ b/sdk/nodejs/getExtensionSchema.ts @@ -69,7 +69,7 @@ export interface GetExtensionSchemaArgs { */ export interface GetExtensionSchemaResult { /** - * The provider-assigned unique ID for this managed resource. + * The ID of the found extension vendor. */ readonly id: string; /** diff --git a/sdk/nodejs/getTag.ts b/sdk/nodejs/getTag.ts index ffba152f..aa24b5bc 100644 --- a/sdk/nodejs/getTag.ts +++ b/sdk/nodejs/getTag.ts @@ -49,7 +49,7 @@ export interface GetTagArgs { */ export interface GetTagResult { /** - * The provider-assigned unique ID for this managed resource. + * The ID of the found team. */ readonly id: string; readonly label: string; diff --git a/sdk/nodejs/incidentWorkflowTrigger.ts b/sdk/nodejs/incidentWorkflowTrigger.ts index 85b9ccd7..84cfbf1d 100644 --- a/sdk/nodejs/incidentWorkflowTrigger.ts +++ b/sdk/nodejs/incidentWorkflowTrigger.ts @@ -2,6 +2,8 @@ // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** @@ -85,6 +87,10 @@ export class IncidentWorkflowTrigger extends pulumi.CustomResource { * A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. */ public readonly condition!: pulumi.Output; + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + */ + public readonly permissions!: pulumi.Output; /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. */ @@ -116,6 +122,7 @@ export class IncidentWorkflowTrigger extends pulumi.CustomResource { if (opts.id) { const state = argsOrState as IncidentWorkflowTriggerState | undefined; resourceInputs["condition"] = state ? state.condition : undefined; + resourceInputs["permissions"] = state ? state.permissions : undefined; resourceInputs["services"] = state ? state.services : undefined; resourceInputs["subscribedToAllServices"] = state ? state.subscribedToAllServices : undefined; resourceInputs["type"] = state ? state.type : undefined; @@ -132,6 +139,7 @@ export class IncidentWorkflowTrigger extends pulumi.CustomResource { throw new Error("Missing required property 'workflow'"); } resourceInputs["condition"] = args ? args.condition : undefined; + resourceInputs["permissions"] = args ? args.permissions : undefined; resourceInputs["services"] = args ? args.services : undefined; resourceInputs["subscribedToAllServices"] = args ? args.subscribedToAllServices : undefined; resourceInputs["type"] = args ? args.type : undefined; @@ -150,6 +158,10 @@ export interface IncidentWorkflowTriggerState { * A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. */ condition?: pulumi.Input; + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + */ + permissions?: pulumi.Input; /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. */ @@ -176,6 +188,10 @@ export interface IncidentWorkflowTriggerArgs { * A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. */ condition?: pulumi.Input; + /** + * Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + */ + permissions?: pulumi.Input; /** * A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. */ diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 3fb5616f..cb02d8fd 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -1170,6 +1170,17 @@ export interface IncidentWorkflowStepInput { value: pulumi.Input; } +export interface IncidentWorkflowTriggerPermissions { + /** + * If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + */ + restricted?: pulumi.Input; + /** + * The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + */ + teamId?: pulumi.Input; +} + export interface ProviderUseAppOauthScopedToken { pdClientId?: pulumi.Input; pdClientSecret?: pulumi.Input; diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index b9b886a4..fa24e813 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -1447,6 +1447,17 @@ export interface IncidentWorkflowStepInput { value: string; } +export interface IncidentWorkflowTriggerPermissions { + /** + * If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + */ + restricted: boolean; + /** + * The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + */ + teamId?: string; +} + export interface ResponsePlayResponder { /** * Description of escalation policy diff --git a/sdk/python/pulumi_pagerduty/_inputs.py b/sdk/python/pulumi_pagerduty/_inputs.py index cf92f2cf..788d710a 100644 --- a/sdk/python/pulumi_pagerduty/_inputs.py +++ b/sdk/python/pulumi_pagerduty/_inputs.py @@ -79,6 +79,7 @@ 'IncidentWorkflowStepInlineStepsInputStepArgs', 'IncidentWorkflowStepInlineStepsInputStepInputArgs', 'IncidentWorkflowStepInputArgs', + 'IncidentWorkflowTriggerPermissionsArgs', 'ProviderUseAppOauthScopedTokenArgs', 'ResponsePlayResponderArgs', 'ResponsePlayResponderEscalationRuleArgs', @@ -4133,6 +4134,45 @@ def generated(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "generated", value) +@pulumi.input_type +class IncidentWorkflowTriggerPermissionsArgs: + def __init__(__self__, *, + restricted: Optional[pulumi.Input[bool]] = None, + team_id: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[bool] restricted: If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + :param pulumi.Input[str] team_id: The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + """ + if restricted is not None: + pulumi.set(__self__, "restricted", restricted) + if team_id is not None: + pulumi.set(__self__, "team_id", team_id) + + @property + @pulumi.getter + def restricted(self) -> Optional[pulumi.Input[bool]]: + """ + If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + """ + return pulumi.get(self, "restricted") + + @restricted.setter + def restricted(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "restricted", value) + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> Optional[pulumi.Input[str]]: + """ + The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + """ + return pulumi.get(self, "team_id") + + @team_id.setter + def team_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "team_id", value) + + @pulumi.input_type class ProviderUseAppOauthScopedTokenArgs: def __init__(__self__, *, diff --git a/sdk/python/pulumi_pagerduty/extension.py b/sdk/python/pulumi_pagerduty/extension.py index ccb84aa7..454d1bd6 100644 --- a/sdk/python/pulumi_pagerduty/extension.py +++ b/sdk/python/pulumi_pagerduty/extension.py @@ -411,7 +411,7 @@ def get(resource_name: str, @property @pulumi.getter - def config(self) -> pulumi.Output[Optional[str]]: + def config(self) -> pulumi.Output[str]: return pulumi.get(self, "config") @property diff --git a/sdk/python/pulumi_pagerduty/get_extension_schema.py b/sdk/python/pulumi_pagerduty/get_extension_schema.py index c95a17db..47d2e210 100644 --- a/sdk/python/pulumi_pagerduty/get_extension_schema.py +++ b/sdk/python/pulumi_pagerduty/get_extension_schema.py @@ -36,7 +36,7 @@ def __init__(__self__, id=None, name=None, type=None): @pulumi.getter def id(self) -> str: """ - The provider-assigned unique ID for this managed resource. + The ID of the found extension vendor. """ return pulumi.get(self, "id") diff --git a/sdk/python/pulumi_pagerduty/get_tag.py b/sdk/python/pulumi_pagerduty/get_tag.py index 21b41f20..96673c73 100644 --- a/sdk/python/pulumi_pagerduty/get_tag.py +++ b/sdk/python/pulumi_pagerduty/get_tag.py @@ -33,7 +33,7 @@ def __init__(__self__, id=None, label=None): @pulumi.getter def id(self) -> str: """ - The provider-assigned unique ID for this managed resource. + The ID of the found team. """ return pulumi.get(self, "id") diff --git a/sdk/python/pulumi_pagerduty/incident_workflow_trigger.py b/sdk/python/pulumi_pagerduty/incident_workflow_trigger.py index 087227cd..c7b22efa 100644 --- a/sdk/python/pulumi_pagerduty/incident_workflow_trigger.py +++ b/sdk/python/pulumi_pagerduty/incident_workflow_trigger.py @@ -8,6 +8,8 @@ import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities +from . import outputs +from ._inputs import * __all__ = ['IncidentWorkflowTriggerArgs', 'IncidentWorkflowTrigger'] @@ -18,6 +20,7 @@ def __init__(__self__, *, type: pulumi.Input[str], workflow: pulumi.Input[str], condition: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']] = None, services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ The set of arguments for constructing a IncidentWorkflowTrigger resource. @@ -25,6 +28,7 @@ def __init__(__self__, *, :param pulumi.Input[str] type: [Updating causes resource replacement] May be either `manual` or `conditional`. :param pulumi.Input[str] workflow: The workflow ID for the workflow to trigger. :param pulumi.Input[str] condition: A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. + :param pulumi.Input['IncidentWorkflowTriggerPermissionsArgs'] permissions: Indicates who can start this Trigger. Applicable only to `manual`-type triggers. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. """ pulumi.set(__self__, "subscribed_to_all_services", subscribed_to_all_services) @@ -32,6 +36,8 @@ def __init__(__self__, *, pulumi.set(__self__, "workflow", workflow) if condition is not None: pulumi.set(__self__, "condition", condition) + if permissions is not None: + pulumi.set(__self__, "permissions", permissions) if services is not None: pulumi.set(__self__, "services", services) @@ -83,6 +89,18 @@ def condition(self) -> Optional[pulumi.Input[str]]: def condition(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "condition", value) + @property + @pulumi.getter + def permissions(self) -> Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']]: + """ + Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + """ + return pulumi.get(self, "permissions") + + @permissions.setter + def permissions(self, value: Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']]): + pulumi.set(self, "permissions", value) + @property @pulumi.getter def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: @@ -100,6 +118,7 @@ def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): class _IncidentWorkflowTriggerState: def __init__(__self__, *, condition: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']] = None, services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, subscribed_to_all_services: Optional[pulumi.Input[bool]] = None, type: Optional[pulumi.Input[str]] = None, @@ -107,6 +126,7 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering IncidentWorkflowTrigger resources. :param pulumi.Input[str] condition: A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. + :param pulumi.Input['IncidentWorkflowTriggerPermissionsArgs'] permissions: Indicates who can start this Trigger. Applicable only to `manual`-type triggers. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. :param pulumi.Input[bool] subscribed_to_all_services: Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. :param pulumi.Input[str] type: [Updating causes resource replacement] May be either `manual` or `conditional`. @@ -114,6 +134,8 @@ def __init__(__self__, *, """ if condition is not None: pulumi.set(__self__, "condition", condition) + if permissions is not None: + pulumi.set(__self__, "permissions", permissions) if services is not None: pulumi.set(__self__, "services", services) if subscribed_to_all_services is not None: @@ -135,6 +157,18 @@ def condition(self) -> Optional[pulumi.Input[str]]: def condition(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "condition", value) + @property + @pulumi.getter + def permissions(self) -> Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']]: + """ + Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + """ + return pulumi.get(self, "permissions") + + @permissions.setter + def permissions(self, value: Optional[pulumi.Input['IncidentWorkflowTriggerPermissionsArgs']]): + pulumi.set(self, "permissions", value) + @property @pulumi.getter def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: @@ -190,6 +224,7 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, condition: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[pulumi.InputType['IncidentWorkflowTriggerPermissionsArgs']]] = None, services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, subscribed_to_all_services: Optional[pulumi.Input[bool]] = None, type: Optional[pulumi.Input[str]] = None, @@ -240,6 +275,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] condition: A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. + :param pulumi.Input[pulumi.InputType['IncidentWorkflowTriggerPermissionsArgs']] permissions: Indicates who can start this Trigger. Applicable only to `manual`-type triggers. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. :param pulumi.Input[bool] subscribed_to_all_services: Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. :param pulumi.Input[str] type: [Updating causes resource replacement] May be either `manual` or `conditional`. @@ -309,6 +345,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, condition: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[pulumi.InputType['IncidentWorkflowTriggerPermissionsArgs']]] = None, services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, subscribed_to_all_services: Optional[pulumi.Input[bool]] = None, type: Optional[pulumi.Input[str]] = None, @@ -323,6 +360,7 @@ def _internal_init(__self__, __props__ = IncidentWorkflowTriggerArgs.__new__(IncidentWorkflowTriggerArgs) __props__.__dict__["condition"] = condition + __props__.__dict__["permissions"] = permissions __props__.__dict__["services"] = services if subscribed_to_all_services is None and not opts.urn: raise TypeError("Missing required property 'subscribed_to_all_services'") @@ -344,6 +382,7 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, condition: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[pulumi.InputType['IncidentWorkflowTriggerPermissionsArgs']]] = None, services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, subscribed_to_all_services: Optional[pulumi.Input[bool]] = None, type: Optional[pulumi.Input[str]] = None, @@ -356,6 +395,7 @@ def get(resource_name: str, :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[str] condition: A [PCL](https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview) condition string which must be satisfied for the trigger to fire. + :param pulumi.Input[pulumi.InputType['IncidentWorkflowTriggerPermissionsArgs']] permissions: Indicates who can start this Trigger. Applicable only to `manual`-type triggers. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: A list of service IDs. Incidents in any of the listed services are eligible to fire this trigger. :param pulumi.Input[bool] subscribed_to_all_services: Set to `true` if the trigger should be eligible for firing on all services. Only allowed to be `true` if the services list is not defined or empty. :param pulumi.Input[str] type: [Updating causes resource replacement] May be either `manual` or `conditional`. @@ -366,6 +406,7 @@ def get(resource_name: str, __props__ = _IncidentWorkflowTriggerState.__new__(_IncidentWorkflowTriggerState) __props__.__dict__["condition"] = condition + __props__.__dict__["permissions"] = permissions __props__.__dict__["services"] = services __props__.__dict__["subscribed_to_all_services"] = subscribed_to_all_services __props__.__dict__["type"] = type @@ -380,6 +421,14 @@ def condition(self) -> pulumi.Output[Optional[str]]: """ return pulumi.get(self, "condition") + @property + @pulumi.getter + def permissions(self) -> pulumi.Output['outputs.IncidentWorkflowTriggerPermissions']: + """ + Indicates who can start this Trigger. Applicable only to `manual`-type triggers. + """ + return pulumi.get(self, "permissions") + @property @pulumi.getter def services(self) -> pulumi.Output[Optional[Sequence[str]]]: diff --git a/sdk/python/pulumi_pagerduty/outputs.py b/sdk/python/pulumi_pagerduty/outputs.py index 4ee5614f..59c1b525 100644 --- a/sdk/python/pulumi_pagerduty/outputs.py +++ b/sdk/python/pulumi_pagerduty/outputs.py @@ -80,6 +80,7 @@ 'IncidentWorkflowStepInlineStepsInputStep', 'IncidentWorkflowStepInlineStepsInputStepInput', 'IncidentWorkflowStepInput', + 'IncidentWorkflowTriggerPermissions', 'ResponsePlayResponder', 'ResponsePlayResponderEscalationRule', 'ResponsePlayResponderEscalationRuleTarget', @@ -3603,6 +3604,54 @@ def generated(self) -> Optional[bool]: return pulumi.get(self, "generated") +@pulumi.output_type +class IncidentWorkflowTriggerPermissions(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "teamId": + suggest = "team_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in IncidentWorkflowTriggerPermissions. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + IncidentWorkflowTriggerPermissions.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + IncidentWorkflowTriggerPermissions.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + restricted: Optional[bool] = None, + team_id: Optional[str] = None): + """ + :param bool restricted: If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + :param str team_id: The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + """ + if restricted is not None: + pulumi.set(__self__, "restricted", restricted) + if team_id is not None: + pulumi.set(__self__, "team_id", team_id) + + @property + @pulumi.getter + def restricted(self) -> Optional[bool]: + """ + If `true`, indicates that the Trigger can only be started by authorized Users. If `false` (default), any user can start this Trigger. Applicable only to `manual`-type triggers. + """ + return pulumi.get(self, "restricted") + + @property + @pulumi.getter(name="teamId") + def team_id(self) -> Optional[str]: + """ + The ID of the Team whose members can manually start this Trigger. Required and allowed only if `restricted` is `true`. + """ + return pulumi.get(self, "team_id") + + @pulumi.output_type class ResponsePlayResponder(dict): @staticmethod diff --git a/upstream b/upstream index 991aecc6..a9a6cba5 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 991aecc6cdc7c8e49791c923fc1a64997f6bcfbe +Subproject commit a9a6cba5e89e7ae53e85bd8600890ee30e14c5cc