From 2339df59dc1a979e510f41b1e39c800a0dd4935d Mon Sep 17 00:00:00 2001 From: Dvir Segev <37977923+dvirsegev@users.noreply.github.com> Date: Mon, 14 Aug 2023 16:26:19 +0300 Subject: [PATCH] Upgrade terraform to latest + Add webhook resource (#64) * Upgrade terraform to latest + Add webhook resource * feat: Upgrade tf to latest + Add webhook resource --------- Co-authored-by: Engin Diri --- .../pulumi-resource-port/bridge-metadata.json | 26 +- provider/cmd/pulumi-resource-port/schema.json | 236 ++++++++ provider/go.mod | 14 +- provider/go.sum | 28 +- provider/resources.go | 4 +- sdk/go/port/init.go | 7 + sdk/go/port/pulumiTypes.go | 470 ++++++++++++++- sdk/go/port/webhook.go | 348 +++++++++++ sdk/nodejs/index.ts | 8 + sdk/nodejs/tsconfig.json | 3 +- sdk/nodejs/types/input.ts | 28 + sdk/nodejs/types/output.ts | 28 + sdk/nodejs/webhook.ts | 207 +++++++ sdk/python/port_pulumi/__init__.py | 9 + sdk/python/port_pulumi/_inputs.py | 245 +++++++- sdk/python/port_pulumi/outputs.py | 243 +++++++- sdk/python/port_pulumi/webhook.py | 539 ++++++++++++++++++ 17 files changed, 2407 insertions(+), 36 deletions(-) create mode 100644 sdk/go/port/webhook.go create mode 100644 sdk/nodejs/webhook.ts create mode 100644 sdk/python/port_pulumi/webhook.py diff --git a/provider/cmd/pulumi-resource-port/bridge-metadata.json b/provider/cmd/pulumi-resource-port/bridge-metadata.json index 6639182..30a7281 100644 --- a/provider/cmd/pulumi-resource-port/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-port/bridge-metadata.json @@ -3,7 +3,8 @@ "resources": { "port:index/action:Action": "port_action", "port:index/blueprint:Blueprint": "port_blueprint", - "port:index/entity:Entity": "port_entity" + "port:index/entity:Entity": "port_entity", + "port:index/webhook:Webhook": "port_webhook" }, "renamedProperties": { "port:index/ActionGithubMethod:ActionGithubMethod": { @@ -42,13 +43,17 @@ "jqQuery": "jq_query" }, "port:index/ActionUserPropertiesArrayPropsNumberItems:ActionUserPropertiesArrayPropsNumberItems": { - "defaults": "default" + "defaults": "default", + "enumJqQuery": "enum_jq_query", + "enums": "enum" }, "port:index/ActionUserPropertiesArrayPropsObjectItems:ActionUserPropertiesArrayPropsObjectItems": { "defaults": "default" }, "port:index/ActionUserPropertiesArrayPropsStringItems:ActionUserPropertiesArrayPropsStringItems": { - "defaults": "default" + "defaults": "default", + "enumJqQuery": "enum_jq_query", + "enums": "enum" }, "port:index/ActionUserPropertiesBooleanProps:ActionUserPropertiesBooleanProps": { "defaultJqQuery": "default_jq_query", @@ -144,6 +149,15 @@ "manyRelations": "many_relations", "singleRelations": "single_relations" }, + "port:index/WebhookMapping:WebhookMapping": { + "itemsToParse": "items_to_parse" + }, + "port:index/WebhookSecurity:WebhookSecurity": { + "requestIdentifierPath": "request_identifier_path", + "signatureAlgorithm": "signature_algorithm", + "signatureHeaderName": "signature_header_name", + "signaturePrefix": "signature_prefix" + }, "port:index/action:Action": { "approvalEmailNotification": "approval_email_notification", "approvalWebhookNotification": "approval_webhook_notification", @@ -174,6 +188,12 @@ "updatedAt": "updated_at", "updatedBy": "updated_by" }, + "port:index/webhook:Webhook": { + "createdAt": "created_at", + "createdBy": "created_by", + "updatedAt": "updated_at", + "updatedBy": "updated_by" + }, "port:index:Provider": { "baseUrl": "base_url", "clientId": "client_id" diff --git a/provider/cmd/pulumi-resource-port/schema.json b/provider/cmd/pulumi-resource-port/schema.json index cd99e47..78480b8 100644 --- a/provider/cmd/pulumi-resource-port/schema.json +++ b/provider/cmd/pulumi-resource-port/schema.json @@ -328,6 +328,15 @@ "items": { "type": "number" } + }, + "enumJqQuery": { + "type": "string" + }, + "enums": { + "type": "array", + "items": { + "type": "number" + } } }, "type": "object" @@ -357,6 +366,15 @@ "type": "string" } }, + "enumJqQuery": { + "type": "string" + }, + "enums": { + "type": "array", + "items": { + "type": "string" + } + }, "format": { "type": "string" } @@ -1273,6 +1291,79 @@ } }, "type": "object" + }, + "port:index/WebhookMapping:WebhookMapping": { + "properties": { + "blueprint": { + "type": "string" + }, + "entity": { + "$ref": "#/types/port:index/WebhookMappingEntity:WebhookMappingEntity" + }, + "filter": { + "type": "string" + }, + "itemsToParse": { + "type": "string" + } + }, + "type": "object", + "required": [ + "blueprint", + "entity" + ] + }, + "port:index/WebhookMappingEntity:WebhookMappingEntity": { + "properties": { + "icon": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "relations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "team": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "type": "object", + "required": [ + "identifier" + ] + }, + "port:index/WebhookSecurity:WebhookSecurity": { + "properties": { + "requestIdentifierPath": { + "type": "string" + }, + "secret": { + "type": "string" + }, + "signatureAlgorithm": { + "type": "string" + }, + "signatureHeaderName": { + "type": "string" + }, + "signaturePrefix": { + "type": "string" + } + }, + "type": "object" } }, "provider": { @@ -1916,6 +2007,151 @@ }, "type": "object" } + }, + "port:index/webhook:Webhook": { + "properties": { + "createdAt": { + "type": "string", + "description": "The creation date of the webhook\n" + }, + "createdBy": { + "type": "string", + "description": "The creator of the webhook\n" + }, + "description": { + "type": "string", + "description": "The description of the webhook\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the webhook is enabled\n" + }, + "icon": { + "type": "string", + "description": "The icon of the webhook\n" + }, + "identifier": { + "type": "string", + "description": "The identifier of the webhook\n" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/types/port:index/WebhookMapping:WebhookMapping" + }, + "description": "The mappings of the webhook\n" + }, + "security": { + "$ref": "#/types/port:index/WebhookSecurity:WebhookSecurity", + "description": "The security of the webhook\n" + }, + "title": { + "type": "string", + "description": "The title of the webhook\n" + }, + "updatedAt": { + "type": "string", + "description": "The last update date of the webhook\n" + }, + "updatedBy": { + "type": "string", + "description": "The last updater of the webhook\n" + } + }, + "required": [ + "createdAt", + "createdBy", + "enabled", + "identifier", + "updatedAt", + "updatedBy" + ], + "inputProperties": { + "description": { + "type": "string", + "description": "The description of the webhook\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the webhook is enabled\n" + }, + "icon": { + "type": "string", + "description": "The icon of the webhook\n" + }, + "identifier": { + "type": "string", + "description": "The identifier of the webhook\n" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/types/port:index/WebhookMapping:WebhookMapping" + }, + "description": "The mappings of the webhook\n" + }, + "security": { + "$ref": "#/types/port:index/WebhookSecurity:WebhookSecurity", + "description": "The security of the webhook\n" + }, + "title": { + "type": "string", + "description": "The title of the webhook\n" + } + }, + "stateInputs": { + "description": "Input properties used for looking up and filtering Webhook resources.\n", + "properties": { + "createdAt": { + "type": "string", + "description": "The creation date of the webhook\n" + }, + "createdBy": { + "type": "string", + "description": "The creator of the webhook\n" + }, + "description": { + "type": "string", + "description": "The description of the webhook\n" + }, + "enabled": { + "type": "boolean", + "description": "Whether the webhook is enabled\n" + }, + "icon": { + "type": "string", + "description": "The icon of the webhook\n" + }, + "identifier": { + "type": "string", + "description": "The identifier of the webhook\n" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/types/port:index/WebhookMapping:WebhookMapping" + }, + "description": "The mappings of the webhook\n" + }, + "security": { + "$ref": "#/types/port:index/WebhookSecurity:WebhookSecurity", + "description": "The security of the webhook\n" + }, + "title": { + "type": "string", + "description": "The title of the webhook\n" + }, + "updatedAt": { + "type": "string", + "description": "The last update date of the webhook\n" + }, + "updatedBy": { + "type": "string", + "description": "The last updater of the webhook\n" + } + }, + "type": "object" + } } } } \ No newline at end of file diff --git a/provider/go.mod b/provider/go.mod index 5d73759..bed3717 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -5,9 +5,9 @@ go 1.20 replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20230327102345-3fa930f86570 require ( - github.com/port-labs/terraform-provider-port-labs v1.2.3 - github.com/pulumi/pulumi-terraform-bridge/pf v0.15.0 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.56.1 + github.com/port-labs/terraform-provider-port-labs v1.4.0 + github.com/pulumi/pulumi-terraform-bridge/pf v0.15.2 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0 github.com/pulumi/pulumi/sdk/v3 v3.77.1 ) @@ -15,7 +15,7 @@ require ( cloud.google.com/go v0.110.4 // indirect cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/iam v1.1.1 // indirect cloud.google.com/go/kms v1.12.1 // indirect cloud.google.com/go/logging v1.7.0 // indirect cloud.google.com/go/longrunning v0.5.1 // indirect @@ -181,7 +181,7 @@ require ( github.com/pulumi/pulumi-java/pkg v0.9.4 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect github.com/pulumi/pulumi-yaml v1.1.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.76.1 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.77.1 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect @@ -229,8 +229,8 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect + google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/grpc v1.57.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 4cc9faa..8835e3c 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -119,8 +119,8 @@ cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.12.1 h1:xZmZuwy2cwzsocmKDOPu4BL7umg8QXagQx6fKVmf45U= cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= @@ -1581,8 +1581,8 @@ github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/port-labs/terraform-provider-port-labs v1.2.3 h1:d5hRKgmCroGL02O0dyWfL7v8BRtAZHQLN8kJt4QCxoE= -github.com/port-labs/terraform-provider-port-labs v1.2.3/go.mod h1:pLn48/X30XZIrW3gvUM1rkVjAZkO7ZFjegc0x4hFdtc= +github.com/port-labs/terraform-provider-port-labs v1.4.0 h1:Bm9PxDyu3at8Q8unS4ibSYtlZdYpfLyNWcxpd+BWIj0= +github.com/port-labs/terraform-provider-port-labs v1.4.0/go.mod h1:pLn48/X30XZIrW3gvUM1rkVjAZkO7ZFjegc0x4hFdtc= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= @@ -1645,17 +1645,17 @@ github.com/prometheus/prometheus v0.37.0/go.mod h1:egARUgz+K93zwqsVIAneFlLZefyGO github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pulumi/pulumi-java/pkg v0.9.4 h1:gIQZmlUI1o9ye8CL2XFqtmAX6Lwr9uj/+HzjboiSmK4= github.com/pulumi/pulumi-java/pkg v0.9.4/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ= -github.com/pulumi/pulumi-terraform-bridge/pf v0.15.0 h1:9ODws24rjbjCUezcBqGeq0Zv4MnE5fsD9MOExHdQbE4= -github.com/pulumi/pulumi-terraform-bridge/pf v0.15.0/go.mod h1:78zmO88vcJDcWoCJZfaHAQReHTEhuNx6BxlE5MUlLJc= +github.com/pulumi/pulumi-terraform-bridge/pf v0.15.2 h1:zKAzAHk9AKk+EF9FG4vT9u3jYiZFES/Mjq+s9mgoRs8= +github.com/pulumi/pulumi-terraform-bridge/pf v0.15.2/go.mod h1:XdOy385fEso7q3NuL+zAS3I1i+X47Bg01AlVD5aJRS4= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.56.1 h1:OXecHzpPIJrYQJXpzwAgsYYWdEo8e5bNVPxPYKdZV3s= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.56.1/go.mod h1:ykaml8e6XS/yI9JOcNZ+6gLirs6EWTB0FmjbT+JyEdU= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0 h1:munOxi56glme47MT8/wI29o9wrRBJrEQuwjAgm1zviI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0/go.mod h1:ykaml8e6XS/yI9JOcNZ+6gLirs6EWTB0FmjbT+JyEdU= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w= github.com/pulumi/pulumi-yaml v1.1.1 h1:8pyBNIU8+ym0wYpjhsCqN+cutygfK1XbhY2YEeNfyXY= github.com/pulumi/pulumi-yaml v1.1.1/go.mod h1:GhpdS6rFpwqvUtKdA+fQy8P28iNvncng39IXh5q68vE= -github.com/pulumi/pulumi/pkg/v3 v3.76.1 h1:OdQHwI2oB8Q1Es13by63QhDqIdk7Kl4w39UTrX3M44Y= -github.com/pulumi/pulumi/pkg/v3 v3.76.1/go.mod h1:DnDxyPUhLJv334MdPIIGYD0V7i7fVb7j9AvYf18MI6w= +github.com/pulumi/pulumi/pkg/v3 v3.77.1 h1:PRZBBkAGniJkxtDh6NHIfmlo/wZKXMD50rDfhr5xyDM= +github.com/pulumi/pulumi/pkg/v3 v3.77.1/go.mod h1:dj+QrN7vtnC2S0VBFiEIl9estr1nZnKB92S0zylQIag= github.com/pulumi/pulumi/sdk/v3 v3.77.1 h1:DfMCVjtzaSYqpZmMmRdHA5i1vaD6zYsCkDmcZqojREI= github.com/pulumi/pulumi/sdk/v3 v3.77.1/go.mod h1:FEFictCHoa8CYzKDSc0t9ErrNiaO9n7pChreLQLDH+M= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= @@ -2674,10 +2674,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e h1:xIXmWJ303kJCuogpj0bHq+dcjcZHU+XFyc1I0Yl9cRg= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 h1:XVeBY8d/FaK4848myy41HBqnDwvxeV3zMZhwN1TvAMU= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= diff --git a/provider/resources.go b/provider/resources.go index 5024c22..b18a5cb 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -17,14 +17,15 @@ package port import ( _ "embed" "fmt" - "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" "path/filepath" "unicode" + "github.com/port-labs/pulumi-port/provider/pkg/version" port "github.com/port-labs/terraform-provider-port-labs/provider" portVersion "github.com/port-labs/terraform-provider-port-labs/version" pf "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" + "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" ) // all of the token components used below. @@ -106,6 +107,7 @@ func Provider() tfbridge.ProviderInfo { "port_action": {Tok: portResource(mainMod, "Action")}, "port_blueprint": {Tok: portResource(mainMod, "Blueprint")}, "port_entity": {Tok: portResource(mainMod, "Entity")}, + "port_webhook": {Tok: portResource(mainMod, "Webhook")}, }, DataSources: map[string]*tfbridge.DataSourceInfo{ // Map each resource in the Terraform provider to a Pulumi function. An example diff --git a/sdk/go/port/init.go b/sdk/go/port/init.go index 961d9c8..1bc6cc8 100644 --- a/sdk/go/port/init.go +++ b/sdk/go/port/init.go @@ -27,6 +27,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Blueprint{} case "port:index/entity:Entity": r = &Entity{} + case "port:index/webhook:Webhook": + r = &Webhook{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } @@ -73,6 +75,11 @@ func init() { "index/entity", &module{version}, ) + pulumi.RegisterResourceModule( + "port", + "index/webhook", + &module{version}, + ) pulumi.RegisterResourcePackage( "port", &pkg{version}, diff --git a/sdk/go/port/pulumiTypes.go b/sdk/go/port/pulumiTypes.go index 65f6f10..e13e85e 100644 --- a/sdk/go/port/pulumiTypes.go +++ b/sdk/go/port/pulumiTypes.go @@ -1760,7 +1760,9 @@ func (o ActionUserPropertiesArrayPropsDatasetRuleValueOutput) JqQuery() pulumi.S } type ActionUserPropertiesArrayPropsNumberItems struct { - Defaults []float64 `pulumi:"defaults"` + Defaults []float64 `pulumi:"defaults"` + EnumJqQuery *string `pulumi:"enumJqQuery"` + Enums []float64 `pulumi:"enums"` } // ActionUserPropertiesArrayPropsNumberItemsInput is an input type that accepts ActionUserPropertiesArrayPropsNumberItemsArgs and ActionUserPropertiesArrayPropsNumberItemsOutput values. @@ -1775,7 +1777,9 @@ type ActionUserPropertiesArrayPropsNumberItemsInput interface { } type ActionUserPropertiesArrayPropsNumberItemsArgs struct { - Defaults pulumi.Float64ArrayInput `pulumi:"defaults"` + Defaults pulumi.Float64ArrayInput `pulumi:"defaults"` + EnumJqQuery pulumi.StringPtrInput `pulumi:"enumJqQuery"` + Enums pulumi.Float64ArrayInput `pulumi:"enums"` } func (ActionUserPropertiesArrayPropsNumberItemsArgs) ElementType() reflect.Type { @@ -1859,6 +1863,14 @@ func (o ActionUserPropertiesArrayPropsNumberItemsOutput) Defaults() pulumi.Float return o.ApplyT(func(v ActionUserPropertiesArrayPropsNumberItems) []float64 { return v.Defaults }).(pulumi.Float64ArrayOutput) } +func (o ActionUserPropertiesArrayPropsNumberItemsOutput) EnumJqQuery() pulumi.StringPtrOutput { + return o.ApplyT(func(v ActionUserPropertiesArrayPropsNumberItems) *string { return v.EnumJqQuery }).(pulumi.StringPtrOutput) +} + +func (o ActionUserPropertiesArrayPropsNumberItemsOutput) Enums() pulumi.Float64ArrayOutput { + return o.ApplyT(func(v ActionUserPropertiesArrayPropsNumberItems) []float64 { return v.Enums }).(pulumi.Float64ArrayOutput) +} + type ActionUserPropertiesArrayPropsNumberItemsPtrOutput struct{ *pulumi.OutputState } func (ActionUserPropertiesArrayPropsNumberItemsPtrOutput) ElementType() reflect.Type { @@ -1892,6 +1904,24 @@ func (o ActionUserPropertiesArrayPropsNumberItemsPtrOutput) Defaults() pulumi.Fl }).(pulumi.Float64ArrayOutput) } +func (o ActionUserPropertiesArrayPropsNumberItemsPtrOutput) EnumJqQuery() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ActionUserPropertiesArrayPropsNumberItems) *string { + if v == nil { + return nil + } + return v.EnumJqQuery + }).(pulumi.StringPtrOutput) +} + +func (o ActionUserPropertiesArrayPropsNumberItemsPtrOutput) Enums() pulumi.Float64ArrayOutput { + return o.ApplyT(func(v *ActionUserPropertiesArrayPropsNumberItems) []float64 { + if v == nil { + return nil + } + return v.Enums + }).(pulumi.Float64ArrayOutput) +} + type ActionUserPropertiesArrayPropsObjectItems struct { Defaults []map[string]string `pulumi:"defaults"` } @@ -2026,9 +2056,11 @@ func (o ActionUserPropertiesArrayPropsObjectItemsPtrOutput) Defaults() pulumi.St } type ActionUserPropertiesArrayPropsStringItems struct { - Blueprint *string `pulumi:"blueprint"` - Defaults []string `pulumi:"defaults"` - Format *string `pulumi:"format"` + Blueprint *string `pulumi:"blueprint"` + Defaults []string `pulumi:"defaults"` + EnumJqQuery *string `pulumi:"enumJqQuery"` + Enums []string `pulumi:"enums"` + Format *string `pulumi:"format"` } // ActionUserPropertiesArrayPropsStringItemsInput is an input type that accepts ActionUserPropertiesArrayPropsStringItemsArgs and ActionUserPropertiesArrayPropsStringItemsOutput values. @@ -2043,9 +2075,11 @@ type ActionUserPropertiesArrayPropsStringItemsInput interface { } type ActionUserPropertiesArrayPropsStringItemsArgs struct { - Blueprint pulumi.StringPtrInput `pulumi:"blueprint"` - Defaults pulumi.StringArrayInput `pulumi:"defaults"` - Format pulumi.StringPtrInput `pulumi:"format"` + Blueprint pulumi.StringPtrInput `pulumi:"blueprint"` + Defaults pulumi.StringArrayInput `pulumi:"defaults"` + EnumJqQuery pulumi.StringPtrInput `pulumi:"enumJqQuery"` + Enums pulumi.StringArrayInput `pulumi:"enums"` + Format pulumi.StringPtrInput `pulumi:"format"` } func (ActionUserPropertiesArrayPropsStringItemsArgs) ElementType() reflect.Type { @@ -2133,6 +2167,14 @@ func (o ActionUserPropertiesArrayPropsStringItemsOutput) Defaults() pulumi.Strin return o.ApplyT(func(v ActionUserPropertiesArrayPropsStringItems) []string { return v.Defaults }).(pulumi.StringArrayOutput) } +func (o ActionUserPropertiesArrayPropsStringItemsOutput) EnumJqQuery() pulumi.StringPtrOutput { + return o.ApplyT(func(v ActionUserPropertiesArrayPropsStringItems) *string { return v.EnumJqQuery }).(pulumi.StringPtrOutput) +} + +func (o ActionUserPropertiesArrayPropsStringItemsOutput) Enums() pulumi.StringArrayOutput { + return o.ApplyT(func(v ActionUserPropertiesArrayPropsStringItems) []string { return v.Enums }).(pulumi.StringArrayOutput) +} + func (o ActionUserPropertiesArrayPropsStringItemsOutput) Format() pulumi.StringPtrOutput { return o.ApplyT(func(v ActionUserPropertiesArrayPropsStringItems) *string { return v.Format }).(pulumi.StringPtrOutput) } @@ -2179,6 +2221,24 @@ func (o ActionUserPropertiesArrayPropsStringItemsPtrOutput) Defaults() pulumi.St }).(pulumi.StringArrayOutput) } +func (o ActionUserPropertiesArrayPropsStringItemsPtrOutput) EnumJqQuery() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ActionUserPropertiesArrayPropsStringItems) *string { + if v == nil { + return nil + } + return v.EnumJqQuery + }).(pulumi.StringPtrOutput) +} + +func (o ActionUserPropertiesArrayPropsStringItemsPtrOutput) Enums() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ActionUserPropertiesArrayPropsStringItems) []string { + if v == nil { + return nil + } + return v.Enums + }).(pulumi.StringArrayOutput) +} + func (o ActionUserPropertiesArrayPropsStringItemsPtrOutput) Format() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActionUserPropertiesArrayPropsStringItems) *string { if v == nil { @@ -7069,6 +7129,390 @@ func (o EntityRelationsPtrOutput) SingleRelations() pulumi.StringMapOutput { }).(pulumi.StringMapOutput) } +type WebhookMapping struct { + Blueprint string `pulumi:"blueprint"` + Entity WebhookMappingEntity `pulumi:"entity"` + Filter *string `pulumi:"filter"` + ItemsToParse *string `pulumi:"itemsToParse"` +} + +// WebhookMappingInput is an input type that accepts WebhookMappingArgs and WebhookMappingOutput values. +// You can construct a concrete instance of `WebhookMappingInput` via: +// +// WebhookMappingArgs{...} +type WebhookMappingInput interface { + pulumi.Input + + ToWebhookMappingOutput() WebhookMappingOutput + ToWebhookMappingOutputWithContext(context.Context) WebhookMappingOutput +} + +type WebhookMappingArgs struct { + Blueprint pulumi.StringInput `pulumi:"blueprint"` + Entity WebhookMappingEntityInput `pulumi:"entity"` + Filter pulumi.StringPtrInput `pulumi:"filter"` + ItemsToParse pulumi.StringPtrInput `pulumi:"itemsToParse"` +} + +func (WebhookMappingArgs) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookMapping)(nil)).Elem() +} + +func (i WebhookMappingArgs) ToWebhookMappingOutput() WebhookMappingOutput { + return i.ToWebhookMappingOutputWithContext(context.Background()) +} + +func (i WebhookMappingArgs) ToWebhookMappingOutputWithContext(ctx context.Context) WebhookMappingOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookMappingOutput) +} + +// WebhookMappingArrayInput is an input type that accepts WebhookMappingArray and WebhookMappingArrayOutput values. +// You can construct a concrete instance of `WebhookMappingArrayInput` via: +// +// WebhookMappingArray{ WebhookMappingArgs{...} } +type WebhookMappingArrayInput interface { + pulumi.Input + + ToWebhookMappingArrayOutput() WebhookMappingArrayOutput + ToWebhookMappingArrayOutputWithContext(context.Context) WebhookMappingArrayOutput +} + +type WebhookMappingArray []WebhookMappingInput + +func (WebhookMappingArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]WebhookMapping)(nil)).Elem() +} + +func (i WebhookMappingArray) ToWebhookMappingArrayOutput() WebhookMappingArrayOutput { + return i.ToWebhookMappingArrayOutputWithContext(context.Background()) +} + +func (i WebhookMappingArray) ToWebhookMappingArrayOutputWithContext(ctx context.Context) WebhookMappingArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookMappingArrayOutput) +} + +type WebhookMappingOutput struct{ *pulumi.OutputState } + +func (WebhookMappingOutput) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookMapping)(nil)).Elem() +} + +func (o WebhookMappingOutput) ToWebhookMappingOutput() WebhookMappingOutput { + return o +} + +func (o WebhookMappingOutput) ToWebhookMappingOutputWithContext(ctx context.Context) WebhookMappingOutput { + return o +} + +func (o WebhookMappingOutput) Blueprint() pulumi.StringOutput { + return o.ApplyT(func(v WebhookMapping) string { return v.Blueprint }).(pulumi.StringOutput) +} + +func (o WebhookMappingOutput) Entity() WebhookMappingEntityOutput { + return o.ApplyT(func(v WebhookMapping) WebhookMappingEntity { return v.Entity }).(WebhookMappingEntityOutput) +} + +func (o WebhookMappingOutput) Filter() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookMapping) *string { return v.Filter }).(pulumi.StringPtrOutput) +} + +func (o WebhookMappingOutput) ItemsToParse() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookMapping) *string { return v.ItemsToParse }).(pulumi.StringPtrOutput) +} + +type WebhookMappingArrayOutput struct{ *pulumi.OutputState } + +func (WebhookMappingArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]WebhookMapping)(nil)).Elem() +} + +func (o WebhookMappingArrayOutput) ToWebhookMappingArrayOutput() WebhookMappingArrayOutput { + return o +} + +func (o WebhookMappingArrayOutput) ToWebhookMappingArrayOutputWithContext(ctx context.Context) WebhookMappingArrayOutput { + return o +} + +func (o WebhookMappingArrayOutput) Index(i pulumi.IntInput) WebhookMappingOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) WebhookMapping { + return vs[0].([]WebhookMapping)[vs[1].(int)] + }).(WebhookMappingOutput) +} + +type WebhookMappingEntity struct { + Icon *string `pulumi:"icon"` + Identifier string `pulumi:"identifier"` + Properties map[string]string `pulumi:"properties"` + Relations map[string]string `pulumi:"relations"` + Team *string `pulumi:"team"` + Title *string `pulumi:"title"` +} + +// WebhookMappingEntityInput is an input type that accepts WebhookMappingEntityArgs and WebhookMappingEntityOutput values. +// You can construct a concrete instance of `WebhookMappingEntityInput` via: +// +// WebhookMappingEntityArgs{...} +type WebhookMappingEntityInput interface { + pulumi.Input + + ToWebhookMappingEntityOutput() WebhookMappingEntityOutput + ToWebhookMappingEntityOutputWithContext(context.Context) WebhookMappingEntityOutput +} + +type WebhookMappingEntityArgs struct { + Icon pulumi.StringPtrInput `pulumi:"icon"` + Identifier pulumi.StringInput `pulumi:"identifier"` + Properties pulumi.StringMapInput `pulumi:"properties"` + Relations pulumi.StringMapInput `pulumi:"relations"` + Team pulumi.StringPtrInput `pulumi:"team"` + Title pulumi.StringPtrInput `pulumi:"title"` +} + +func (WebhookMappingEntityArgs) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookMappingEntity)(nil)).Elem() +} + +func (i WebhookMappingEntityArgs) ToWebhookMappingEntityOutput() WebhookMappingEntityOutput { + return i.ToWebhookMappingEntityOutputWithContext(context.Background()) +} + +func (i WebhookMappingEntityArgs) ToWebhookMappingEntityOutputWithContext(ctx context.Context) WebhookMappingEntityOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookMappingEntityOutput) +} + +type WebhookMappingEntityOutput struct{ *pulumi.OutputState } + +func (WebhookMappingEntityOutput) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookMappingEntity)(nil)).Elem() +} + +func (o WebhookMappingEntityOutput) ToWebhookMappingEntityOutput() WebhookMappingEntityOutput { + return o +} + +func (o WebhookMappingEntityOutput) ToWebhookMappingEntityOutputWithContext(ctx context.Context) WebhookMappingEntityOutput { + return o +} + +func (o WebhookMappingEntityOutput) Icon() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookMappingEntity) *string { return v.Icon }).(pulumi.StringPtrOutput) +} + +func (o WebhookMappingEntityOutput) Identifier() pulumi.StringOutput { + return o.ApplyT(func(v WebhookMappingEntity) string { return v.Identifier }).(pulumi.StringOutput) +} + +func (o WebhookMappingEntityOutput) Properties() pulumi.StringMapOutput { + return o.ApplyT(func(v WebhookMappingEntity) map[string]string { return v.Properties }).(pulumi.StringMapOutput) +} + +func (o WebhookMappingEntityOutput) Relations() pulumi.StringMapOutput { + return o.ApplyT(func(v WebhookMappingEntity) map[string]string { return v.Relations }).(pulumi.StringMapOutput) +} + +func (o WebhookMappingEntityOutput) Team() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookMappingEntity) *string { return v.Team }).(pulumi.StringPtrOutput) +} + +func (o WebhookMappingEntityOutput) Title() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookMappingEntity) *string { return v.Title }).(pulumi.StringPtrOutput) +} + +type WebhookSecurity struct { + RequestIdentifierPath *string `pulumi:"requestIdentifierPath"` + Secret *string `pulumi:"secret"` + SignatureAlgorithm *string `pulumi:"signatureAlgorithm"` + SignatureHeaderName *string `pulumi:"signatureHeaderName"` + SignaturePrefix *string `pulumi:"signaturePrefix"` +} + +// WebhookSecurityInput is an input type that accepts WebhookSecurityArgs and WebhookSecurityOutput values. +// You can construct a concrete instance of `WebhookSecurityInput` via: +// +// WebhookSecurityArgs{...} +type WebhookSecurityInput interface { + pulumi.Input + + ToWebhookSecurityOutput() WebhookSecurityOutput + ToWebhookSecurityOutputWithContext(context.Context) WebhookSecurityOutput +} + +type WebhookSecurityArgs struct { + RequestIdentifierPath pulumi.StringPtrInput `pulumi:"requestIdentifierPath"` + Secret pulumi.StringPtrInput `pulumi:"secret"` + SignatureAlgorithm pulumi.StringPtrInput `pulumi:"signatureAlgorithm"` + SignatureHeaderName pulumi.StringPtrInput `pulumi:"signatureHeaderName"` + SignaturePrefix pulumi.StringPtrInput `pulumi:"signaturePrefix"` +} + +func (WebhookSecurityArgs) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookSecurity)(nil)).Elem() +} + +func (i WebhookSecurityArgs) ToWebhookSecurityOutput() WebhookSecurityOutput { + return i.ToWebhookSecurityOutputWithContext(context.Background()) +} + +func (i WebhookSecurityArgs) ToWebhookSecurityOutputWithContext(ctx context.Context) WebhookSecurityOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookSecurityOutput) +} + +func (i WebhookSecurityArgs) ToWebhookSecurityPtrOutput() WebhookSecurityPtrOutput { + return i.ToWebhookSecurityPtrOutputWithContext(context.Background()) +} + +func (i WebhookSecurityArgs) ToWebhookSecurityPtrOutputWithContext(ctx context.Context) WebhookSecurityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookSecurityOutput).ToWebhookSecurityPtrOutputWithContext(ctx) +} + +// WebhookSecurityPtrInput is an input type that accepts WebhookSecurityArgs, WebhookSecurityPtr and WebhookSecurityPtrOutput values. +// You can construct a concrete instance of `WebhookSecurityPtrInput` via: +// +// WebhookSecurityArgs{...} +// +// or: +// +// nil +type WebhookSecurityPtrInput interface { + pulumi.Input + + ToWebhookSecurityPtrOutput() WebhookSecurityPtrOutput + ToWebhookSecurityPtrOutputWithContext(context.Context) WebhookSecurityPtrOutput +} + +type webhookSecurityPtrType WebhookSecurityArgs + +func WebhookSecurityPtr(v *WebhookSecurityArgs) WebhookSecurityPtrInput { + return (*webhookSecurityPtrType)(v) +} + +func (*webhookSecurityPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**WebhookSecurity)(nil)).Elem() +} + +func (i *webhookSecurityPtrType) ToWebhookSecurityPtrOutput() WebhookSecurityPtrOutput { + return i.ToWebhookSecurityPtrOutputWithContext(context.Background()) +} + +func (i *webhookSecurityPtrType) ToWebhookSecurityPtrOutputWithContext(ctx context.Context) WebhookSecurityPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookSecurityPtrOutput) +} + +type WebhookSecurityOutput struct{ *pulumi.OutputState } + +func (WebhookSecurityOutput) ElementType() reflect.Type { + return reflect.TypeOf((*WebhookSecurity)(nil)).Elem() +} + +func (o WebhookSecurityOutput) ToWebhookSecurityOutput() WebhookSecurityOutput { + return o +} + +func (o WebhookSecurityOutput) ToWebhookSecurityOutputWithContext(ctx context.Context) WebhookSecurityOutput { + return o +} + +func (o WebhookSecurityOutput) ToWebhookSecurityPtrOutput() WebhookSecurityPtrOutput { + return o.ToWebhookSecurityPtrOutputWithContext(context.Background()) +} + +func (o WebhookSecurityOutput) ToWebhookSecurityPtrOutputWithContext(ctx context.Context) WebhookSecurityPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v WebhookSecurity) *WebhookSecurity { + return &v + }).(WebhookSecurityPtrOutput) +} + +func (o WebhookSecurityOutput) RequestIdentifierPath() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookSecurity) *string { return v.RequestIdentifierPath }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityOutput) Secret() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookSecurity) *string { return v.Secret }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityOutput) SignatureAlgorithm() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookSecurity) *string { return v.SignatureAlgorithm }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityOutput) SignatureHeaderName() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookSecurity) *string { return v.SignatureHeaderName }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityOutput) SignaturePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v WebhookSecurity) *string { return v.SignaturePrefix }).(pulumi.StringPtrOutput) +} + +type WebhookSecurityPtrOutput struct{ *pulumi.OutputState } + +func (WebhookSecurityPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**WebhookSecurity)(nil)).Elem() +} + +func (o WebhookSecurityPtrOutput) ToWebhookSecurityPtrOutput() WebhookSecurityPtrOutput { + return o +} + +func (o WebhookSecurityPtrOutput) ToWebhookSecurityPtrOutputWithContext(ctx context.Context) WebhookSecurityPtrOutput { + return o +} + +func (o WebhookSecurityPtrOutput) Elem() WebhookSecurityOutput { + return o.ApplyT(func(v *WebhookSecurity) WebhookSecurity { + if v != nil { + return *v + } + var ret WebhookSecurity + return ret + }).(WebhookSecurityOutput) +} + +func (o WebhookSecurityPtrOutput) RequestIdentifierPath() pulumi.StringPtrOutput { + return o.ApplyT(func(v *WebhookSecurity) *string { + if v == nil { + return nil + } + return v.RequestIdentifierPath + }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityPtrOutput) Secret() pulumi.StringPtrOutput { + return o.ApplyT(func(v *WebhookSecurity) *string { + if v == nil { + return nil + } + return v.Secret + }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityPtrOutput) SignatureAlgorithm() pulumi.StringPtrOutput { + return o.ApplyT(func(v *WebhookSecurity) *string { + if v == nil { + return nil + } + return v.SignatureAlgorithm + }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityPtrOutput) SignatureHeaderName() pulumi.StringPtrOutput { + return o.ApplyT(func(v *WebhookSecurity) *string { + if v == nil { + return nil + } + return v.SignatureHeaderName + }).(pulumi.StringPtrOutput) +} + +func (o WebhookSecurityPtrOutput) SignaturePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *WebhookSecurity) *string { + if v == nil { + return nil + } + return v.SignaturePrefix + }).(pulumi.StringPtrOutput) +} + func init() { pulumi.RegisterInputType(reflect.TypeOf((*ActionApprovalEmailNotificationInput)(nil)).Elem(), ActionApprovalEmailNotificationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ActionApprovalEmailNotificationPtrInput)(nil)).Elem(), ActionApprovalEmailNotificationArgs{}) @@ -7169,6 +7613,11 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*EntityPropertiesArrayPropsPtrInput)(nil)).Elem(), EntityPropertiesArrayPropsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*EntityRelationsInput)(nil)).Elem(), EntityRelationsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*EntityRelationsPtrInput)(nil)).Elem(), EntityRelationsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookMappingInput)(nil)).Elem(), WebhookMappingArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookMappingArrayInput)(nil)).Elem(), WebhookMappingArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookMappingEntityInput)(nil)).Elem(), WebhookMappingEntityArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookSecurityInput)(nil)).Elem(), WebhookSecurityArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookSecurityPtrInput)(nil)).Elem(), WebhookSecurityArgs{}) pulumi.RegisterOutputType(ActionApprovalEmailNotificationOutput{}) pulumi.RegisterOutputType(ActionApprovalEmailNotificationPtrOutput{}) pulumi.RegisterOutputType(ActionApprovalWebhookNotificationOutput{}) @@ -7268,4 +7717,9 @@ func init() { pulumi.RegisterOutputType(EntityPropertiesArrayPropsPtrOutput{}) pulumi.RegisterOutputType(EntityRelationsOutput{}) pulumi.RegisterOutputType(EntityRelationsPtrOutput{}) + pulumi.RegisterOutputType(WebhookMappingOutput{}) + pulumi.RegisterOutputType(WebhookMappingArrayOutput{}) + pulumi.RegisterOutputType(WebhookMappingEntityOutput{}) + pulumi.RegisterOutputType(WebhookSecurityOutput{}) + pulumi.RegisterOutputType(WebhookSecurityPtrOutput{}) } diff --git a/sdk/go/port/webhook.go b/sdk/go/port/webhook.go new file mode 100644 index 0000000..4f0acb1 --- /dev/null +++ b/sdk/go/port/webhook.go @@ -0,0 +1,348 @@ +// 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 port + +import ( + "context" + "reflect" + + "github.com/port-labs/pulumi-port/sdk/go/port/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type Webhook struct { + pulumi.CustomResourceState + + // The creation date of the webhook + CreatedAt pulumi.StringOutput `pulumi:"createdAt"` + // The creator of the webhook + CreatedBy pulumi.StringOutput `pulumi:"createdBy"` + // The description of the webhook + Description pulumi.StringPtrOutput `pulumi:"description"` + // Whether the webhook is enabled + Enabled pulumi.BoolOutput `pulumi:"enabled"` + // The icon of the webhook + Icon pulumi.StringPtrOutput `pulumi:"icon"` + // The identifier of the webhook + Identifier pulumi.StringOutput `pulumi:"identifier"` + // The mappings of the webhook + Mappings WebhookMappingArrayOutput `pulumi:"mappings"` + // The security of the webhook + Security WebhookSecurityPtrOutput `pulumi:"security"` + // The title of the webhook + Title pulumi.StringPtrOutput `pulumi:"title"` + // The last update date of the webhook + UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"` + // The last updater of the webhook + UpdatedBy pulumi.StringOutput `pulumi:"updatedBy"` +} + +// NewWebhook registers a new resource with the given unique name, arguments, and options. +func NewWebhook(ctx *pulumi.Context, + name string, args *WebhookArgs, opts ...pulumi.ResourceOption) (*Webhook, error) { + if args == nil { + args = &WebhookArgs{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource Webhook + err := ctx.RegisterResource("port:index/webhook:Webhook", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetWebhook gets an existing Webhook 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 GetWebhook(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *WebhookState, opts ...pulumi.ResourceOption) (*Webhook, error) { + var resource Webhook + err := ctx.ReadResource("port:index/webhook:Webhook", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Webhook resources. +type webhookState struct { + // The creation date of the webhook + CreatedAt *string `pulumi:"createdAt"` + // The creator of the webhook + CreatedBy *string `pulumi:"createdBy"` + // The description of the webhook + Description *string `pulumi:"description"` + // Whether the webhook is enabled + Enabled *bool `pulumi:"enabled"` + // The icon of the webhook + Icon *string `pulumi:"icon"` + // The identifier of the webhook + Identifier *string `pulumi:"identifier"` + // The mappings of the webhook + Mappings []WebhookMapping `pulumi:"mappings"` + // The security of the webhook + Security *WebhookSecurity `pulumi:"security"` + // The title of the webhook + Title *string `pulumi:"title"` + // The last update date of the webhook + UpdatedAt *string `pulumi:"updatedAt"` + // The last updater of the webhook + UpdatedBy *string `pulumi:"updatedBy"` +} + +type WebhookState struct { + // The creation date of the webhook + CreatedAt pulumi.StringPtrInput + // The creator of the webhook + CreatedBy pulumi.StringPtrInput + // The description of the webhook + Description pulumi.StringPtrInput + // Whether the webhook is enabled + Enabled pulumi.BoolPtrInput + // The icon of the webhook + Icon pulumi.StringPtrInput + // The identifier of the webhook + Identifier pulumi.StringPtrInput + // The mappings of the webhook + Mappings WebhookMappingArrayInput + // The security of the webhook + Security WebhookSecurityPtrInput + // The title of the webhook + Title pulumi.StringPtrInput + // The last update date of the webhook + UpdatedAt pulumi.StringPtrInput + // The last updater of the webhook + UpdatedBy pulumi.StringPtrInput +} + +func (WebhookState) ElementType() reflect.Type { + return reflect.TypeOf((*webhookState)(nil)).Elem() +} + +type webhookArgs struct { + // The description of the webhook + Description *string `pulumi:"description"` + // Whether the webhook is enabled + Enabled *bool `pulumi:"enabled"` + // The icon of the webhook + Icon *string `pulumi:"icon"` + // The identifier of the webhook + Identifier *string `pulumi:"identifier"` + // The mappings of the webhook + Mappings []WebhookMapping `pulumi:"mappings"` + // The security of the webhook + Security *WebhookSecurity `pulumi:"security"` + // The title of the webhook + Title *string `pulumi:"title"` +} + +// The set of arguments for constructing a Webhook resource. +type WebhookArgs struct { + // The description of the webhook + Description pulumi.StringPtrInput + // Whether the webhook is enabled + Enabled pulumi.BoolPtrInput + // The icon of the webhook + Icon pulumi.StringPtrInput + // The identifier of the webhook + Identifier pulumi.StringPtrInput + // The mappings of the webhook + Mappings WebhookMappingArrayInput + // The security of the webhook + Security WebhookSecurityPtrInput + // The title of the webhook + Title pulumi.StringPtrInput +} + +func (WebhookArgs) ElementType() reflect.Type { + return reflect.TypeOf((*webhookArgs)(nil)).Elem() +} + +type WebhookInput interface { + pulumi.Input + + ToWebhookOutput() WebhookOutput + ToWebhookOutputWithContext(ctx context.Context) WebhookOutput +} + +func (*Webhook) ElementType() reflect.Type { + return reflect.TypeOf((**Webhook)(nil)).Elem() +} + +func (i *Webhook) ToWebhookOutput() WebhookOutput { + return i.ToWebhookOutputWithContext(context.Background()) +} + +func (i *Webhook) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookOutput) +} + +// WebhookArrayInput is an input type that accepts WebhookArray and WebhookArrayOutput values. +// You can construct a concrete instance of `WebhookArrayInput` via: +// +// WebhookArray{ WebhookArgs{...} } +type WebhookArrayInput interface { + pulumi.Input + + ToWebhookArrayOutput() WebhookArrayOutput + ToWebhookArrayOutputWithContext(context.Context) WebhookArrayOutput +} + +type WebhookArray []WebhookInput + +func (WebhookArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Webhook)(nil)).Elem() +} + +func (i WebhookArray) ToWebhookArrayOutput() WebhookArrayOutput { + return i.ToWebhookArrayOutputWithContext(context.Background()) +} + +func (i WebhookArray) ToWebhookArrayOutputWithContext(ctx context.Context) WebhookArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookArrayOutput) +} + +// WebhookMapInput is an input type that accepts WebhookMap and WebhookMapOutput values. +// You can construct a concrete instance of `WebhookMapInput` via: +// +// WebhookMap{ "key": WebhookArgs{...} } +type WebhookMapInput interface { + pulumi.Input + + ToWebhookMapOutput() WebhookMapOutput + ToWebhookMapOutputWithContext(context.Context) WebhookMapOutput +} + +type WebhookMap map[string]WebhookInput + +func (WebhookMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Webhook)(nil)).Elem() +} + +func (i WebhookMap) ToWebhookMapOutput() WebhookMapOutput { + return i.ToWebhookMapOutputWithContext(context.Background()) +} + +func (i WebhookMap) ToWebhookMapOutputWithContext(ctx context.Context) WebhookMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(WebhookMapOutput) +} + +type WebhookOutput struct{ *pulumi.OutputState } + +func (WebhookOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Webhook)(nil)).Elem() +} + +func (o WebhookOutput) ToWebhookOutput() WebhookOutput { + return o +} + +func (o WebhookOutput) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput { + return o +} + +// The creation date of the webhook +func (o WebhookOutput) CreatedAt() pulumi.StringOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) +} + +// The creator of the webhook +func (o WebhookOutput) CreatedBy() pulumi.StringOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.CreatedBy }).(pulumi.StringOutput) +} + +// The description of the webhook +func (o WebhookOutput) Description() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) +} + +// Whether the webhook is enabled +func (o WebhookOutput) Enabled() pulumi.BoolOutput { + return o.ApplyT(func(v *Webhook) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) +} + +// The icon of the webhook +func (o WebhookOutput) Icon() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringPtrOutput { return v.Icon }).(pulumi.StringPtrOutput) +} + +// The identifier of the webhook +func (o WebhookOutput) Identifier() pulumi.StringOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.Identifier }).(pulumi.StringOutput) +} + +// The mappings of the webhook +func (o WebhookOutput) Mappings() WebhookMappingArrayOutput { + return o.ApplyT(func(v *Webhook) WebhookMappingArrayOutput { return v.Mappings }).(WebhookMappingArrayOutput) +} + +// The security of the webhook +func (o WebhookOutput) Security() WebhookSecurityPtrOutput { + return o.ApplyT(func(v *Webhook) WebhookSecurityPtrOutput { return v.Security }).(WebhookSecurityPtrOutput) +} + +// The title of the webhook +func (o WebhookOutput) Title() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringPtrOutput { return v.Title }).(pulumi.StringPtrOutput) +} + +// The last update date of the webhook +func (o WebhookOutput) UpdatedAt() pulumi.StringOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput) +} + +// The last updater of the webhook +func (o WebhookOutput) UpdatedBy() pulumi.StringOutput { + return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.UpdatedBy }).(pulumi.StringOutput) +} + +type WebhookArrayOutput struct{ *pulumi.OutputState } + +func (WebhookArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Webhook)(nil)).Elem() +} + +func (o WebhookArrayOutput) ToWebhookArrayOutput() WebhookArrayOutput { + return o +} + +func (o WebhookArrayOutput) ToWebhookArrayOutputWithContext(ctx context.Context) WebhookArrayOutput { + return o +} + +func (o WebhookArrayOutput) Index(i pulumi.IntInput) WebhookOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Webhook { + return vs[0].([]*Webhook)[vs[1].(int)] + }).(WebhookOutput) +} + +type WebhookMapOutput struct{ *pulumi.OutputState } + +func (WebhookMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Webhook)(nil)).Elem() +} + +func (o WebhookMapOutput) ToWebhookMapOutput() WebhookMapOutput { + return o +} + +func (o WebhookMapOutput) ToWebhookMapOutputWithContext(ctx context.Context) WebhookMapOutput { + return o +} + +func (o WebhookMapOutput) MapIndex(k pulumi.StringInput) WebhookOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Webhook { + return vs[0].(map[string]*Webhook)[vs[1].(string)] + }).(WebhookOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*WebhookInput)(nil)).Elem(), &Webhook{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookArrayInput)(nil)).Elem(), WebhookArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*WebhookMapInput)(nil)).Elem(), WebhookMap{}) + pulumi.RegisterOutputType(WebhookOutput{}) + pulumi.RegisterOutputType(WebhookArrayOutput{}) + pulumi.RegisterOutputType(WebhookMapOutput{}) +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 7b7eec3..63d9153 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -25,6 +25,11 @@ export type Provider = import("./provider").Provider; export const Provider: typeof import("./provider").Provider = null as any; utilities.lazyLoad(exports, ["Provider"], () => require("./provider")); +export { WebhookArgs, WebhookState } from "./webhook"; +export type Webhook = import("./webhook").Webhook; +export const Webhook: typeof import("./webhook").Webhook = null as any; +utilities.lazyLoad(exports, ["Webhook"], () => require("./webhook")); + // Export sub-modules: import * as config from "./config"; @@ -45,6 +50,8 @@ const _module = { return new Blueprint(name, undefined, { urn }) case "port:index/entity:Entity": return new Entity(name, undefined, { urn }) + case "port:index/webhook:Webhook": + return new Webhook(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } @@ -53,6 +60,7 @@ const _module = { pulumi.runtime.registerResourceModule("port", "index/action", _module) pulumi.runtime.registerResourceModule("port", "index/blueprint", _module) pulumi.runtime.registerResourceModule("port", "index/entity", _module) +pulumi.runtime.registerResourceModule("port", "index/webhook", _module) pulumi.runtime.registerResourcePackage("port", { version: utilities.getVersion(), constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index c8ae08e..933320d 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -23,6 +23,7 @@ "types/index.ts", "types/input.ts", "types/output.ts", - "utilities.ts" + "utilities.ts", + "webhook.ts" ] } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index f72cb8a..58bac3d 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -84,6 +84,8 @@ export interface ActionUserPropertiesArrayPropsDatasetRuleValue { export interface ActionUserPropertiesArrayPropsNumberItems { defaults?: pulumi.Input[]>; + enumJqQuery?: pulumi.Input; + enums?: pulumi.Input[]>; } export interface ActionUserPropertiesArrayPropsObjectItems { @@ -93,6 +95,8 @@ export interface ActionUserPropertiesArrayPropsObjectItems { export interface ActionUserPropertiesArrayPropsStringItems { blueprint?: pulumi.Input; defaults?: pulumi.Input[]>; + enumJqQuery?: pulumi.Input; + enums?: pulumi.Input[]>; format?: pulumi.Input; } @@ -363,3 +367,27 @@ export interface EntityRelations { manyRelations?: pulumi.Input<{[key: string]: pulumi.Input[]>}>; singleRelations?: pulumi.Input<{[key: string]: pulumi.Input}>; } + +export interface WebhookMapping { + blueprint: pulumi.Input; + entity: pulumi.Input; + filter?: pulumi.Input; + itemsToParse?: pulumi.Input; +} + +export interface WebhookMappingEntity { + icon?: pulumi.Input; + identifier: pulumi.Input; + properties?: pulumi.Input<{[key: string]: pulumi.Input}>; + relations?: pulumi.Input<{[key: string]: pulumi.Input}>; + team?: pulumi.Input; + title?: pulumi.Input; +} + +export interface WebhookSecurity { + requestIdentifierPath?: pulumi.Input; + secret?: pulumi.Input; + signatureAlgorithm?: pulumi.Input; + signatureHeaderName?: pulumi.Input; + signaturePrefix?: pulumi.Input; +} diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 2829ed1..243daf8 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -84,6 +84,8 @@ export interface ActionUserPropertiesArrayPropsDatasetRuleValue { export interface ActionUserPropertiesArrayPropsNumberItems { defaults?: number[]; + enumJqQuery?: string; + enums?: number[]; } export interface ActionUserPropertiesArrayPropsObjectItems { @@ -93,6 +95,8 @@ export interface ActionUserPropertiesArrayPropsObjectItems { export interface ActionUserPropertiesArrayPropsStringItems { blueprint?: string; defaults?: string[]; + enumJqQuery?: string; + enums?: string[]; format?: string; } @@ -364,3 +368,27 @@ export interface EntityRelations { singleRelations?: {[key: string]: string}; } +export interface WebhookMapping { + blueprint: string; + entity: outputs.WebhookMappingEntity; + filter?: string; + itemsToParse?: string; +} + +export interface WebhookMappingEntity { + icon?: string; + identifier: string; + properties?: {[key: string]: string}; + relations?: {[key: string]: string}; + team?: string; + title?: string; +} + +export interface WebhookSecurity { + requestIdentifierPath?: string; + secret?: string; + signatureAlgorithm?: string; + signatureHeaderName?: string; + signaturePrefix?: string; +} + diff --git a/sdk/nodejs/webhook.ts b/sdk/nodejs/webhook.ts new file mode 100644 index 0000000..57d8174 --- /dev/null +++ b/sdk/nodejs/webhook.ts @@ -0,0 +1,207 @@ +// *** 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 inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +export class Webhook extends pulumi.CustomResource { + /** + * Get an existing Webhook 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?: WebhookState, opts?: pulumi.CustomResourceOptions): Webhook { + return new Webhook(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'port:index/webhook:Webhook'; + + /** + * Returns true if the given object is an instance of Webhook. 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 Webhook { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Webhook.__pulumiType; + } + + /** + * The creation date of the webhook + */ + public /*out*/ readonly createdAt!: pulumi.Output; + /** + * The creator of the webhook + */ + public /*out*/ readonly createdBy!: pulumi.Output; + /** + * The description of the webhook + */ + public readonly description!: pulumi.Output; + /** + * Whether the webhook is enabled + */ + public readonly enabled!: pulumi.Output; + /** + * The icon of the webhook + */ + public readonly icon!: pulumi.Output; + /** + * The identifier of the webhook + */ + public readonly identifier!: pulumi.Output; + /** + * The mappings of the webhook + */ + public readonly mappings!: pulumi.Output; + /** + * The security of the webhook + */ + public readonly security!: pulumi.Output; + /** + * The title of the webhook + */ + public readonly title!: pulumi.Output; + /** + * The last update date of the webhook + */ + public /*out*/ readonly updatedAt!: pulumi.Output; + /** + * The last updater of the webhook + */ + public /*out*/ readonly updatedBy!: pulumi.Output; + + /** + * Create a Webhook 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?: WebhookArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: WebhookArgs | WebhookState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as WebhookState | undefined; + resourceInputs["createdAt"] = state ? state.createdAt : undefined; + resourceInputs["createdBy"] = state ? state.createdBy : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["enabled"] = state ? state.enabled : undefined; + resourceInputs["icon"] = state ? state.icon : undefined; + resourceInputs["identifier"] = state ? state.identifier : undefined; + resourceInputs["mappings"] = state ? state.mappings : undefined; + resourceInputs["security"] = state ? state.security : undefined; + resourceInputs["title"] = state ? state.title : undefined; + resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; + resourceInputs["updatedBy"] = state ? state.updatedBy : undefined; + } else { + const args = argsOrState as WebhookArgs | undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["enabled"] = args ? args.enabled : undefined; + resourceInputs["icon"] = args ? args.icon : undefined; + resourceInputs["identifier"] = args ? args.identifier : undefined; + resourceInputs["mappings"] = args ? args.mappings : undefined; + resourceInputs["security"] = args ? args.security : undefined; + resourceInputs["title"] = args ? args.title : undefined; + resourceInputs["createdAt"] = undefined /*out*/; + resourceInputs["createdBy"] = undefined /*out*/; + resourceInputs["updatedAt"] = undefined /*out*/; + resourceInputs["updatedBy"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Webhook.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Webhook resources. + */ +export interface WebhookState { + /** + * The creation date of the webhook + */ + createdAt?: pulumi.Input; + /** + * The creator of the webhook + */ + createdBy?: pulumi.Input; + /** + * The description of the webhook + */ + description?: pulumi.Input; + /** + * Whether the webhook is enabled + */ + enabled?: pulumi.Input; + /** + * The icon of the webhook + */ + icon?: pulumi.Input; + /** + * The identifier of the webhook + */ + identifier?: pulumi.Input; + /** + * The mappings of the webhook + */ + mappings?: pulumi.Input[]>; + /** + * The security of the webhook + */ + security?: pulumi.Input; + /** + * The title of the webhook + */ + title?: pulumi.Input; + /** + * The last update date of the webhook + */ + updatedAt?: pulumi.Input; + /** + * The last updater of the webhook + */ + updatedBy?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Webhook resource. + */ +export interface WebhookArgs { + /** + * The description of the webhook + */ + description?: pulumi.Input; + /** + * Whether the webhook is enabled + */ + enabled?: pulumi.Input; + /** + * The icon of the webhook + */ + icon?: pulumi.Input; + /** + * The identifier of the webhook + */ + identifier?: pulumi.Input; + /** + * The mappings of the webhook + */ + mappings?: pulumi.Input[]>; + /** + * The security of the webhook + */ + security?: pulumi.Input; + /** + * The title of the webhook + */ + title?: pulumi.Input; +} diff --git a/sdk/python/port_pulumi/__init__.py b/sdk/python/port_pulumi/__init__.py index e0a6174..9687957 100644 --- a/sdk/python/port_pulumi/__init__.py +++ b/sdk/python/port_pulumi/__init__.py @@ -9,6 +9,7 @@ from .blueprint import * from .entity import * from .provider import * +from .webhook import * from ._inputs import * from . import outputs @@ -45,6 +46,14 @@ "classes": { "port:index/entity:Entity": "Entity" } + }, + { + "pkg": "port", + "mod": "index/webhook", + "fqn": "port_pulumi", + "classes": { + "port:index/webhook:Webhook": "Webhook" + } } ] """, diff --git a/sdk/python/port_pulumi/_inputs.py b/sdk/python/port_pulumi/_inputs.py index d1c7f88..feca80e 100644 --- a/sdk/python/port_pulumi/_inputs.py +++ b/sdk/python/port_pulumi/_inputs.py @@ -62,6 +62,9 @@ 'EntityPropertiesArgs', 'EntityPropertiesArrayPropsArgs', 'EntityRelationsArgs', + 'WebhookMappingArgs', + 'WebhookMappingEntityArgs', + 'WebhookSecurityArgs', ] @pulumi.input_type @@ -608,9 +611,15 @@ def jq_query(self, value: pulumi.Input[str]): @pulumi.input_type class ActionUserPropertiesArrayPropsNumberItemsArgs: def __init__(__self__, *, - defaults: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None): + defaults: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None, + enum_jq_query: Optional[pulumi.Input[str]] = None, + enums: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]] = None): if defaults is not None: pulumi.set(__self__, "defaults", defaults) + if enum_jq_query is not None: + pulumi.set(__self__, "enum_jq_query", enum_jq_query) + if enums is not None: + pulumi.set(__self__, "enums", enums) @property @pulumi.getter @@ -621,6 +630,24 @@ def defaults(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[float]]]]: def defaults(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]]): pulumi.set(self, "defaults", value) + @property + @pulumi.getter(name="enumJqQuery") + def enum_jq_query(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "enum_jq_query") + + @enum_jq_query.setter + def enum_jq_query(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "enum_jq_query", value) + + @property + @pulumi.getter + def enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[float]]]]: + return pulumi.get(self, "enums") + + @enums.setter + def enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[float]]]]): + pulumi.set(self, "enums", value) + @pulumi.input_type class ActionUserPropertiesArrayPropsObjectItemsArgs: @@ -644,11 +671,17 @@ class ActionUserPropertiesArrayPropsStringItemsArgs: def __init__(__self__, *, blueprint: Optional[pulumi.Input[str]] = None, defaults: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enum_jq_query: Optional[pulumi.Input[str]] = None, + enums: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, format: Optional[pulumi.Input[str]] = None): if blueprint is not None: pulumi.set(__self__, "blueprint", blueprint) if defaults is not None: pulumi.set(__self__, "defaults", defaults) + if enum_jq_query is not None: + pulumi.set(__self__, "enum_jq_query", enum_jq_query) + if enums is not None: + pulumi.set(__self__, "enums", enums) if format is not None: pulumi.set(__self__, "format", format) @@ -670,6 +703,24 @@ def defaults(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: def defaults(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "defaults", value) + @property + @pulumi.getter(name="enumJqQuery") + def enum_jq_query(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "enum_jq_query") + + @enum_jq_query.setter + def enum_jq_query(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "enum_jq_query", value) + + @property + @pulumi.getter + def enums(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + return pulumi.get(self, "enums") + + @enums.setter + def enums(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "enums", value) + @property @pulumi.getter def format(self) -> Optional[pulumi.Input[str]]: @@ -2720,3 +2771,195 @@ def single_relations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Inpu pulumi.set(self, "single_relations", value) +@pulumi.input_type +class WebhookMappingArgs: + def __init__(__self__, *, + blueprint: pulumi.Input[str], + entity: pulumi.Input['WebhookMappingEntityArgs'], + filter: Optional[pulumi.Input[str]] = None, + items_to_parse: Optional[pulumi.Input[str]] = None): + pulumi.set(__self__, "blueprint", blueprint) + pulumi.set(__self__, "entity", entity) + if filter is not None: + pulumi.set(__self__, "filter", filter) + if items_to_parse is not None: + pulumi.set(__self__, "items_to_parse", items_to_parse) + + @property + @pulumi.getter + def blueprint(self) -> pulumi.Input[str]: + return pulumi.get(self, "blueprint") + + @blueprint.setter + def blueprint(self, value: pulumi.Input[str]): + pulumi.set(self, "blueprint", value) + + @property + @pulumi.getter + def entity(self) -> pulumi.Input['WebhookMappingEntityArgs']: + return pulumi.get(self, "entity") + + @entity.setter + def entity(self, value: pulumi.Input['WebhookMappingEntityArgs']): + pulumi.set(self, "entity", value) + + @property + @pulumi.getter + def filter(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "filter") + + @filter.setter + def filter(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "filter", value) + + @property + @pulumi.getter(name="itemsToParse") + def items_to_parse(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "items_to_parse") + + @items_to_parse.setter + def items_to_parse(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "items_to_parse", value) + + +@pulumi.input_type +class WebhookMappingEntityArgs: + def __init__(__self__, *, + identifier: pulumi.Input[str], + icon: Optional[pulumi.Input[str]] = None, + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + relations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + team: Optional[pulumi.Input[str]] = None, + title: Optional[pulumi.Input[str]] = None): + pulumi.set(__self__, "identifier", identifier) + if icon is not None: + pulumi.set(__self__, "icon", icon) + if properties is not None: + pulumi.set(__self__, "properties", properties) + if relations is not None: + pulumi.set(__self__, "relations", relations) + if team is not None: + pulumi.set(__self__, "team", team) + if title is not None: + pulumi.set(__self__, "title", title) + + @property + @pulumi.getter + def identifier(self) -> pulumi.Input[str]: + return pulumi.get(self, "identifier") + + @identifier.setter + def identifier(self, value: pulumi.Input[str]): + pulumi.set(self, "identifier", value) + + @property + @pulumi.getter + def icon(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "icon") + + @icon.setter + def icon(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "icon", value) + + @property + @pulumi.getter + def properties(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + return pulumi.get(self, "properties") + + @properties.setter + def properties(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "properties", value) + + @property + @pulumi.getter + def relations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + return pulumi.get(self, "relations") + + @relations.setter + def relations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "relations", value) + + @property + @pulumi.getter + def team(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "team") + + @team.setter + def team(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "team", value) + + @property + @pulumi.getter + def title(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "title") + + @title.setter + def title(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "title", value) + + +@pulumi.input_type +class WebhookSecurityArgs: + def __init__(__self__, *, + request_identifier_path: Optional[pulumi.Input[str]] = None, + secret: Optional[pulumi.Input[str]] = None, + signature_algorithm: Optional[pulumi.Input[str]] = None, + signature_header_name: Optional[pulumi.Input[str]] = None, + signature_prefix: Optional[pulumi.Input[str]] = None): + if request_identifier_path is not None: + pulumi.set(__self__, "request_identifier_path", request_identifier_path) + if secret is not None: + pulumi.set(__self__, "secret", secret) + if signature_algorithm is not None: + pulumi.set(__self__, "signature_algorithm", signature_algorithm) + if signature_header_name is not None: + pulumi.set(__self__, "signature_header_name", signature_header_name) + if signature_prefix is not None: + pulumi.set(__self__, "signature_prefix", signature_prefix) + + @property + @pulumi.getter(name="requestIdentifierPath") + def request_identifier_path(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "request_identifier_path") + + @request_identifier_path.setter + def request_identifier_path(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "request_identifier_path", value) + + @property + @pulumi.getter + def secret(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "secret") + + @secret.setter + def secret(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret", value) + + @property + @pulumi.getter(name="signatureAlgorithm") + def signature_algorithm(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "signature_algorithm") + + @signature_algorithm.setter + def signature_algorithm(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "signature_algorithm", value) + + @property + @pulumi.getter(name="signatureHeaderName") + def signature_header_name(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "signature_header_name") + + @signature_header_name.setter + def signature_header_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "signature_header_name", value) + + @property + @pulumi.getter(name="signaturePrefix") + def signature_prefix(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "signature_prefix") + + @signature_prefix.setter + def signature_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "signature_prefix", value) + + diff --git a/sdk/python/port_pulumi/outputs.py b/sdk/python/port_pulumi/outputs.py index 13c4c33..fee4a5e 100644 --- a/sdk/python/port_pulumi/outputs.py +++ b/sdk/python/port_pulumi/outputs.py @@ -63,6 +63,9 @@ 'EntityProperties', 'EntityPropertiesArrayProps', 'EntityRelations', + 'WebhookMapping', + 'WebhookMappingEntity', + 'WebhookSecurity', ] @pulumi.output_type @@ -563,16 +566,49 @@ def jq_query(self) -> str: @pulumi.output_type class ActionUserPropertiesArrayPropsNumberItems(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "enumJqQuery": + suggest = "enum_jq_query" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ActionUserPropertiesArrayPropsNumberItems. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ActionUserPropertiesArrayPropsNumberItems.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ActionUserPropertiesArrayPropsNumberItems.__key_warning(key) + return super().get(key, default) + def __init__(__self__, *, - defaults: Optional[Sequence[float]] = None): + defaults: Optional[Sequence[float]] = None, + enum_jq_query: Optional[str] = None, + enums: Optional[Sequence[float]] = None): if defaults is not None: pulumi.set(__self__, "defaults", defaults) + if enum_jq_query is not None: + pulumi.set(__self__, "enum_jq_query", enum_jq_query) + if enums is not None: + pulumi.set(__self__, "enums", enums) @property @pulumi.getter def defaults(self) -> Optional[Sequence[float]]: return pulumi.get(self, "defaults") + @property + @pulumi.getter(name="enumJqQuery") + def enum_jq_query(self) -> Optional[str]: + return pulumi.get(self, "enum_jq_query") + + @property + @pulumi.getter + def enums(self) -> Optional[Sequence[float]]: + return pulumi.get(self, "enums") + @pulumi.output_type class ActionUserPropertiesArrayPropsObjectItems(dict): @@ -589,14 +625,37 @@ def defaults(self) -> Optional[Sequence[Mapping[str, str]]]: @pulumi.output_type class ActionUserPropertiesArrayPropsStringItems(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "enumJqQuery": + suggest = "enum_jq_query" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ActionUserPropertiesArrayPropsStringItems. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ActionUserPropertiesArrayPropsStringItems.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ActionUserPropertiesArrayPropsStringItems.__key_warning(key) + return super().get(key, default) + def __init__(__self__, *, blueprint: Optional[str] = None, defaults: Optional[Sequence[str]] = None, + enum_jq_query: Optional[str] = None, + enums: Optional[Sequence[str]] = None, format: Optional[str] = None): if blueprint is not None: pulumi.set(__self__, "blueprint", blueprint) if defaults is not None: pulumi.set(__self__, "defaults", defaults) + if enum_jq_query is not None: + pulumi.set(__self__, "enum_jq_query", enum_jq_query) + if enums is not None: + pulumi.set(__self__, "enums", enums) if format is not None: pulumi.set(__self__, "format", format) @@ -610,6 +669,16 @@ def blueprint(self) -> Optional[str]: def defaults(self) -> Optional[Sequence[str]]: return pulumi.get(self, "defaults") + @property + @pulumi.getter(name="enumJqQuery") + def enum_jq_query(self) -> Optional[str]: + return pulumi.get(self, "enum_jq_query") + + @property + @pulumi.getter + def enums(self) -> Optional[Sequence[str]]: + return pulumi.get(self, "enums") + @property @pulumi.getter def format(self) -> Optional[str]: @@ -2360,3 +2429,175 @@ def single_relations(self) -> Optional[Mapping[str, str]]: return pulumi.get(self, "single_relations") +@pulumi.output_type +class WebhookMapping(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "itemsToParse": + suggest = "items_to_parse" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in WebhookMapping. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + WebhookMapping.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + WebhookMapping.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + blueprint: str, + entity: 'outputs.WebhookMappingEntity', + filter: Optional[str] = None, + items_to_parse: Optional[str] = None): + pulumi.set(__self__, "blueprint", blueprint) + pulumi.set(__self__, "entity", entity) + if filter is not None: + pulumi.set(__self__, "filter", filter) + if items_to_parse is not None: + pulumi.set(__self__, "items_to_parse", items_to_parse) + + @property + @pulumi.getter + def blueprint(self) -> str: + return pulumi.get(self, "blueprint") + + @property + @pulumi.getter + def entity(self) -> 'outputs.WebhookMappingEntity': + return pulumi.get(self, "entity") + + @property + @pulumi.getter + def filter(self) -> Optional[str]: + return pulumi.get(self, "filter") + + @property + @pulumi.getter(name="itemsToParse") + def items_to_parse(self) -> Optional[str]: + return pulumi.get(self, "items_to_parse") + + +@pulumi.output_type +class WebhookMappingEntity(dict): + def __init__(__self__, *, + identifier: str, + icon: Optional[str] = None, + properties: Optional[Mapping[str, str]] = None, + relations: Optional[Mapping[str, str]] = None, + team: Optional[str] = None, + title: Optional[str] = None): + pulumi.set(__self__, "identifier", identifier) + if icon is not None: + pulumi.set(__self__, "icon", icon) + if properties is not None: + pulumi.set(__self__, "properties", properties) + if relations is not None: + pulumi.set(__self__, "relations", relations) + if team is not None: + pulumi.set(__self__, "team", team) + if title is not None: + pulumi.set(__self__, "title", title) + + @property + @pulumi.getter + def identifier(self) -> str: + return pulumi.get(self, "identifier") + + @property + @pulumi.getter + def icon(self) -> Optional[str]: + return pulumi.get(self, "icon") + + @property + @pulumi.getter + def properties(self) -> Optional[Mapping[str, str]]: + return pulumi.get(self, "properties") + + @property + @pulumi.getter + def relations(self) -> Optional[Mapping[str, str]]: + return pulumi.get(self, "relations") + + @property + @pulumi.getter + def team(self) -> Optional[str]: + return pulumi.get(self, "team") + + @property + @pulumi.getter + def title(self) -> Optional[str]: + return pulumi.get(self, "title") + + +@pulumi.output_type +class WebhookSecurity(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "requestIdentifierPath": + suggest = "request_identifier_path" + elif key == "signatureAlgorithm": + suggest = "signature_algorithm" + elif key == "signatureHeaderName": + suggest = "signature_header_name" + elif key == "signaturePrefix": + suggest = "signature_prefix" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in WebhookSecurity. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + WebhookSecurity.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + WebhookSecurity.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + request_identifier_path: Optional[str] = None, + secret: Optional[str] = None, + signature_algorithm: Optional[str] = None, + signature_header_name: Optional[str] = None, + signature_prefix: Optional[str] = None): + if request_identifier_path is not None: + pulumi.set(__self__, "request_identifier_path", request_identifier_path) + if secret is not None: + pulumi.set(__self__, "secret", secret) + if signature_algorithm is not None: + pulumi.set(__self__, "signature_algorithm", signature_algorithm) + if signature_header_name is not None: + pulumi.set(__self__, "signature_header_name", signature_header_name) + if signature_prefix is not None: + pulumi.set(__self__, "signature_prefix", signature_prefix) + + @property + @pulumi.getter(name="requestIdentifierPath") + def request_identifier_path(self) -> Optional[str]: + return pulumi.get(self, "request_identifier_path") + + @property + @pulumi.getter + def secret(self) -> Optional[str]: + return pulumi.get(self, "secret") + + @property + @pulumi.getter(name="signatureAlgorithm") + def signature_algorithm(self) -> Optional[str]: + return pulumi.get(self, "signature_algorithm") + + @property + @pulumi.getter(name="signatureHeaderName") + def signature_header_name(self) -> Optional[str]: + return pulumi.get(self, "signature_header_name") + + @property + @pulumi.getter(name="signaturePrefix") + def signature_prefix(self) -> Optional[str]: + return pulumi.get(self, "signature_prefix") + + diff --git a/sdk/python/port_pulumi/webhook.py b/sdk/python/port_pulumi/webhook.py new file mode 100644 index 0000000..a831824 --- /dev/null +++ b/sdk/python/port_pulumi/webhook.py @@ -0,0 +1,539 @@ +# 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 pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['WebhookArgs', 'Webhook'] + +@pulumi.input_type +class WebhookArgs: + def __init__(__self__, *, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + icon: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + mappings: Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]] = None, + security: Optional[pulumi.Input['WebhookSecurityArgs']] = None, + title: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a Webhook resource. + :param pulumi.Input[str] description: The description of the webhook + :param pulumi.Input[bool] enabled: Whether the webhook is enabled + :param pulumi.Input[str] icon: The icon of the webhook + :param pulumi.Input[str] identifier: The identifier of the webhook + :param pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]] mappings: The mappings of the webhook + :param pulumi.Input['WebhookSecurityArgs'] security: The security of the webhook + :param pulumi.Input[str] title: The title of the webhook + """ + if description is not None: + pulumi.set(__self__, "description", description) + if enabled is not None: + pulumi.set(__self__, "enabled", enabled) + if icon is not None: + pulumi.set(__self__, "icon", icon) + if identifier is not None: + pulumi.set(__self__, "identifier", identifier) + if mappings is not None: + pulumi.set(__self__, "mappings", mappings) + if security is not None: + pulumi.set(__self__, "security", security) + if title is not None: + pulumi.set(__self__, "title", title) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the webhook + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the webhook is enabled + """ + return pulumi.get(self, "enabled") + + @enabled.setter + def enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "enabled", value) + + @property + @pulumi.getter + def icon(self) -> Optional[pulumi.Input[str]]: + """ + The icon of the webhook + """ + return pulumi.get(self, "icon") + + @icon.setter + def icon(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "icon", value) + + @property + @pulumi.getter + def identifier(self) -> Optional[pulumi.Input[str]]: + """ + The identifier of the webhook + """ + return pulumi.get(self, "identifier") + + @identifier.setter + def identifier(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "identifier", value) + + @property + @pulumi.getter + def mappings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]]: + """ + The mappings of the webhook + """ + return pulumi.get(self, "mappings") + + @mappings.setter + def mappings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]]): + pulumi.set(self, "mappings", value) + + @property + @pulumi.getter + def security(self) -> Optional[pulumi.Input['WebhookSecurityArgs']]: + """ + The security of the webhook + """ + return pulumi.get(self, "security") + + @security.setter + def security(self, value: Optional[pulumi.Input['WebhookSecurityArgs']]): + pulumi.set(self, "security", value) + + @property + @pulumi.getter + def title(self) -> Optional[pulumi.Input[str]]: + """ + The title of the webhook + """ + return pulumi.get(self, "title") + + @title.setter + def title(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "title", value) + + +@pulumi.input_type +class _WebhookState: + def __init__(__self__, *, + created_at: Optional[pulumi.Input[str]] = None, + created_by: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + icon: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + mappings: Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]] = None, + security: Optional[pulumi.Input['WebhookSecurityArgs']] = None, + title: Optional[pulumi.Input[str]] = None, + updated_at: Optional[pulumi.Input[str]] = None, + updated_by: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering Webhook resources. + :param pulumi.Input[str] created_at: The creation date of the webhook + :param pulumi.Input[str] created_by: The creator of the webhook + :param pulumi.Input[str] description: The description of the webhook + :param pulumi.Input[bool] enabled: Whether the webhook is enabled + :param pulumi.Input[str] icon: The icon of the webhook + :param pulumi.Input[str] identifier: The identifier of the webhook + :param pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]] mappings: The mappings of the webhook + :param pulumi.Input['WebhookSecurityArgs'] security: The security of the webhook + :param pulumi.Input[str] title: The title of the webhook + :param pulumi.Input[str] updated_at: The last update date of the webhook + :param pulumi.Input[str] updated_by: The last updater of the webhook + """ + if created_at is not None: + pulumi.set(__self__, "created_at", created_at) + if created_by is not None: + pulumi.set(__self__, "created_by", created_by) + if description is not None: + pulumi.set(__self__, "description", description) + if enabled is not None: + pulumi.set(__self__, "enabled", enabled) + if icon is not None: + pulumi.set(__self__, "icon", icon) + if identifier is not None: + pulumi.set(__self__, "identifier", identifier) + if mappings is not None: + pulumi.set(__self__, "mappings", mappings) + if security is not None: + pulumi.set(__self__, "security", security) + if title is not None: + pulumi.set(__self__, "title", title) + if updated_at is not None: + pulumi.set(__self__, "updated_at", updated_at) + if updated_by is not None: + pulumi.set(__self__, "updated_by", updated_by) + + @property + @pulumi.getter(name="createdAt") + def created_at(self) -> Optional[pulumi.Input[str]]: + """ + The creation date of the webhook + """ + return pulumi.get(self, "created_at") + + @created_at.setter + def created_at(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "created_at", value) + + @property + @pulumi.getter(name="createdBy") + def created_by(self) -> Optional[pulumi.Input[str]]: + """ + The creator of the webhook + """ + return pulumi.get(self, "created_by") + + @created_by.setter + def created_by(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "created_by", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the webhook + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the webhook is enabled + """ + return pulumi.get(self, "enabled") + + @enabled.setter + def enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "enabled", value) + + @property + @pulumi.getter + def icon(self) -> Optional[pulumi.Input[str]]: + """ + The icon of the webhook + """ + return pulumi.get(self, "icon") + + @icon.setter + def icon(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "icon", value) + + @property + @pulumi.getter + def identifier(self) -> Optional[pulumi.Input[str]]: + """ + The identifier of the webhook + """ + return pulumi.get(self, "identifier") + + @identifier.setter + def identifier(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "identifier", value) + + @property + @pulumi.getter + def mappings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]]: + """ + The mappings of the webhook + """ + return pulumi.get(self, "mappings") + + @mappings.setter + def mappings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['WebhookMappingArgs']]]]): + pulumi.set(self, "mappings", value) + + @property + @pulumi.getter + def security(self) -> Optional[pulumi.Input['WebhookSecurityArgs']]: + """ + The security of the webhook + """ + return pulumi.get(self, "security") + + @security.setter + def security(self, value: Optional[pulumi.Input['WebhookSecurityArgs']]): + pulumi.set(self, "security", value) + + @property + @pulumi.getter + def title(self) -> Optional[pulumi.Input[str]]: + """ + The title of the webhook + """ + return pulumi.get(self, "title") + + @title.setter + def title(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "title", value) + + @property + @pulumi.getter(name="updatedAt") + def updated_at(self) -> Optional[pulumi.Input[str]]: + """ + The last update date of the webhook + """ + return pulumi.get(self, "updated_at") + + @updated_at.setter + def updated_at(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "updated_at", value) + + @property + @pulumi.getter(name="updatedBy") + def updated_by(self) -> Optional[pulumi.Input[str]]: + """ + The last updater of the webhook + """ + return pulumi.get(self, "updated_by") + + @updated_by.setter + def updated_by(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "updated_by", value) + + +class Webhook(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + icon: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + mappings: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WebhookMappingArgs']]]]] = None, + security: Optional[pulumi.Input[pulumi.InputType['WebhookSecurityArgs']]] = None, + title: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Create a Webhook resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] description: The description of the webhook + :param pulumi.Input[bool] enabled: Whether the webhook is enabled + :param pulumi.Input[str] icon: The icon of the webhook + :param pulumi.Input[str] identifier: The identifier of the webhook + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WebhookMappingArgs']]]] mappings: The mappings of the webhook + :param pulumi.Input[pulumi.InputType['WebhookSecurityArgs']] security: The security of the webhook + :param pulumi.Input[str] title: The title of the webhook + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: Optional[WebhookArgs] = None, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Create a Webhook resource with the given unique name, props, and options. + :param str resource_name: The name of the resource. + :param WebhookArgs 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(WebhookArgs, 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, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + icon: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + mappings: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WebhookMappingArgs']]]]] = None, + security: Optional[pulumi.Input[pulumi.InputType['WebhookSecurityArgs']]] = None, + title: 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__ = WebhookArgs.__new__(WebhookArgs) + + __props__.__dict__["description"] = description + __props__.__dict__["enabled"] = enabled + __props__.__dict__["icon"] = icon + __props__.__dict__["identifier"] = identifier + __props__.__dict__["mappings"] = mappings + __props__.__dict__["security"] = security + __props__.__dict__["title"] = title + __props__.__dict__["created_at"] = None + __props__.__dict__["created_by"] = None + __props__.__dict__["updated_at"] = None + __props__.__dict__["updated_by"] = None + super(Webhook, __self__).__init__( + 'port:index/webhook:Webhook', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + created_at: Optional[pulumi.Input[str]] = None, + created_by: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + icon: Optional[pulumi.Input[str]] = None, + identifier: Optional[pulumi.Input[str]] = None, + mappings: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WebhookMappingArgs']]]]] = None, + security: Optional[pulumi.Input[pulumi.InputType['WebhookSecurityArgs']]] = None, + title: Optional[pulumi.Input[str]] = None, + updated_at: Optional[pulumi.Input[str]] = None, + updated_by: Optional[pulumi.Input[str]] = None) -> 'Webhook': + """ + Get an existing Webhook 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[str] created_at: The creation date of the webhook + :param pulumi.Input[str] created_by: The creator of the webhook + :param pulumi.Input[str] description: The description of the webhook + :param pulumi.Input[bool] enabled: Whether the webhook is enabled + :param pulumi.Input[str] icon: The icon of the webhook + :param pulumi.Input[str] identifier: The identifier of the webhook + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WebhookMappingArgs']]]] mappings: The mappings of the webhook + :param pulumi.Input[pulumi.InputType['WebhookSecurityArgs']] security: The security of the webhook + :param pulumi.Input[str] title: The title of the webhook + :param pulumi.Input[str] updated_at: The last update date of the webhook + :param pulumi.Input[str] updated_by: The last updater of the webhook + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _WebhookState.__new__(_WebhookState) + + __props__.__dict__["created_at"] = created_at + __props__.__dict__["created_by"] = created_by + __props__.__dict__["description"] = description + __props__.__dict__["enabled"] = enabled + __props__.__dict__["icon"] = icon + __props__.__dict__["identifier"] = identifier + __props__.__dict__["mappings"] = mappings + __props__.__dict__["security"] = security + __props__.__dict__["title"] = title + __props__.__dict__["updated_at"] = updated_at + __props__.__dict__["updated_by"] = updated_by + return Webhook(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="createdAt") + def created_at(self) -> pulumi.Output[str]: + """ + The creation date of the webhook + """ + return pulumi.get(self, "created_at") + + @property + @pulumi.getter(name="createdBy") + def created_by(self) -> pulumi.Output[str]: + """ + The creator of the webhook + """ + return pulumi.get(self, "created_by") + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + The description of the webhook + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def enabled(self) -> pulumi.Output[bool]: + """ + Whether the webhook is enabled + """ + return pulumi.get(self, "enabled") + + @property + @pulumi.getter + def icon(self) -> pulumi.Output[Optional[str]]: + """ + The icon of the webhook + """ + return pulumi.get(self, "icon") + + @property + @pulumi.getter + def identifier(self) -> pulumi.Output[str]: + """ + The identifier of the webhook + """ + return pulumi.get(self, "identifier") + + @property + @pulumi.getter + def mappings(self) -> pulumi.Output[Optional[Sequence['outputs.WebhookMapping']]]: + """ + The mappings of the webhook + """ + return pulumi.get(self, "mappings") + + @property + @pulumi.getter + def security(self) -> pulumi.Output[Optional['outputs.WebhookSecurity']]: + """ + The security of the webhook + """ + return pulumi.get(self, "security") + + @property + @pulumi.getter + def title(self) -> pulumi.Output[Optional[str]]: + """ + The title of the webhook + """ + return pulumi.get(self, "title") + + @property + @pulumi.getter(name="updatedAt") + def updated_at(self) -> pulumi.Output[str]: + """ + The last update date of the webhook + """ + return pulumi.get(self, "updated_at") + + @property + @pulumi.getter(name="updatedBy") + def updated_by(self) -> pulumi.Output[str]: + """ + The last updater of the webhook + """ + return pulumi.get(self, "updated_by") +