From bb22dc468eecf1024e46227cfd1cf76a56dc27a2 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Fri, 10 May 2024 07:31:17 -0700 Subject: [PATCH] Upgrade terraform-provider-fastly to v5.9.0 (#533) This PR was generated via `$ upgrade-provider pulumi/pulumi-fastly --kind=all --target-bridge-version=latest`. --- - Upgrading terraform-provider-fastly from 5.8.0 to 5.9.0. Fixes #532 --- .../bridge-metadata.json | 3 + .../cmd/pulumi-resource-fastly/schema.json | 102 ++++- provider/go.mod | 16 +- provider/go.sum | 31 +- sdk/dotnet/Alert.cs | 9 + sdk/dotnet/GetVclSnippets.cs | 107 +++++ .../Inputs/AlertEvaluationStrategyArgs.cs | 10 +- .../Inputs/AlertEvaluationStrategyGetArgs.cs | 10 +- sdk/dotnet/Integration.cs | 251 +++++++++++ sdk/dotnet/Outputs/AlertEvaluationStrategy.cs | 11 +- sdk/go/fastly/alert.go | 9 + sdk/go/fastly/getVclSnippets.go | 68 ++- sdk/go/fastly/init.go | 7 + sdk/go/fastly/integration.go | 359 ++++++++++++++++ sdk/go/fastly/pulumiTypes.go | 35 +- .../main/java/com/pulumi/fastly/Alert.java | 7 + .../com/pulumi/fastly/FastlyFunctions.java | 224 ++++++++++ .../java/com/pulumi/fastly/Integration.java | 208 ++++++++++ .../com/pulumi/fastly/IntegrationArgs.java | 203 +++++++++ .../inputs/AlertEvaluationStrategyArgs.java | 55 ++- .../fastly/inputs/GetVclSnippetsArgs.java | 40 ++ .../inputs/GetVclSnippetsPlainArgs.java | 28 ++ .../fastly/inputs/IntegrationState.java | 196 +++++++++ .../outputs/AlertEvaluationStrategy.java | 31 +- .../fastly/outputs/GetVclSnippetsResult.java | 24 ++ sdk/nodejs/alert.ts | 2 + sdk/nodejs/getVclSnippets.ts | 75 ++++ sdk/nodejs/index.ts | 8 + sdk/nodejs/integration.ts | 189 +++++++++ sdk/nodejs/tsconfig.json | 1 + sdk/nodejs/types/input.ts | 8 +- sdk/nodejs/types/output.ts | 8 +- sdk/python/pulumi_fastly/__init__.py | 9 + sdk/python/pulumi_fastly/_inputs.py | 26 +- sdk/python/pulumi_fastly/alert.py | 8 +- sdk/python/pulumi_fastly/get_vcl_snippets.py | 63 ++- sdk/python/pulumi_fastly/integration.py | 388 ++++++++++++++++++ sdk/python/pulumi_fastly/outputs.py | 39 +- upstream | 2 +- 39 files changed, 2791 insertions(+), 79 deletions(-) create mode 100644 sdk/dotnet/Integration.cs create mode 100644 sdk/go/fastly/integration.go create mode 100644 sdk/java/src/main/java/com/pulumi/fastly/Integration.java create mode 100644 sdk/java/src/main/java/com/pulumi/fastly/IntegrationArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/fastly/inputs/IntegrationState.java create mode 100644 sdk/nodejs/integration.ts create mode 100644 sdk/python/pulumi_fastly/integration.py diff --git a/provider/cmd/pulumi-resource-fastly/bridge-metadata.json b/provider/cmd/pulumi-resource-fastly/bridge-metadata.json index c22be470..36a7436f 100644 --- a/provider/cmd/pulumi-resource-fastly/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-fastly/bridge-metadata.json @@ -31,6 +31,9 @@ "fastly_configstore_entries": { "current": "fastly:index/configstoreEntries:ConfigstoreEntries" }, + "fastly_integration": { + "current": "fastly:index/integration:Integration" + }, "fastly_kvstore": { "current": "fastly:index/kvstore:Kvstore" }, diff --git a/provider/cmd/pulumi-resource-fastly/schema.json b/provider/cmd/pulumi-resource-fastly/schema.json index 7783120b..431bb431 100644 --- a/provider/cmd/pulumi-resource-fastly/schema.json +++ b/provider/cmd/pulumi-resource-fastly/schema.json @@ -93,9 +93,13 @@ }, "fastly:index/AlertEvaluationStrategy:AlertEvaluationStrategy": { "properties": { + "ignoreBelow": { + "type": "number", + "description": "Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise.\n" + }, "period": { "type": "string", - "description": "The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`.\n" + "description": "The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`.\n" }, "threshold": { "type": "number", @@ -103,7 +107,7 @@ }, "type": { "type": "string", - "description": "Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`.\n" + "description": "Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`.\n" } }, "type": "object", @@ -4354,7 +4358,7 @@ }, "resources": { "fastly:index/alert:Alert": { - "description": "Provides a Fastly Alert. Alerts send notifications to custom integrations (e.g., Slack channels, PagerDuty, Microsoft Teams and New Relic) when an observed metric either exceeds or falls below a threshold.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst example = new fastly.ServiceVcl(\"example\", {name: \"my_vcl_service\"});\nconst exampleAlert = new fastly.Alert(\"example\", {\n name: \"my_vcl_service errors\",\n serviceId: example.id,\n source: \"stats\",\n metric: \"status_5xx\",\n evaluationStrategy: {\n type: \"above_threshold\",\n period: \"5m\",\n threshold: 10,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\nexample = fastly.ServiceVcl(\"example\", name=\"my_vcl_service\")\nexample_alert = fastly.Alert(\"example\",\n name=\"my_vcl_service errors\",\n service_id=example.id,\n source=\"stats\",\n metric=\"status_5xx\",\n evaluation_strategy=fastly.AlertEvaluationStrategyArgs(\n type=\"above_threshold\",\n period=\"5m\",\n threshold=10,\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Fastly.ServiceVcl(\"example\", new()\n {\n Name = \"my_vcl_service\",\n });\n\n var exampleAlert = new Fastly.Alert(\"example\", new()\n {\n Name = \"my_vcl_service errors\",\n ServiceId = example.Id,\n Source = \"stats\",\n Metric = \"status_5xx\",\n EvaluationStrategy = new Fastly.Inputs.AlertEvaluationStrategyArgs\n {\n Type = \"above_threshold\",\n Period = \"5m\",\n Threshold = 10,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := fastly.NewServiceVcl(ctx, \"example\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"my_vcl_service\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewAlert(ctx, \"example\", \u0026fastly.AlertArgs{\n\t\t\tName: pulumi.String(\"my_vcl_service errors\"),\n\t\t\tServiceId: example.ID(),\n\t\t\tSource: pulumi.String(\"stats\"),\n\t\t\tMetric: pulumi.String(\"status_5xx\"),\n\t\t\tEvaluationStrategy: \u0026fastly.AlertEvaluationStrategyArgs{\n\t\t\t\tType: pulumi.String(\"above_threshold\"),\n\t\t\t\tPeriod: pulumi.String(\"5m\"),\n\t\t\t\tThreshold: pulumi.Float64(10),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.Alert;\nimport com.pulumi.fastly.AlertArgs;\nimport com.pulumi.fastly.inputs.AlertEvaluationStrategyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ServiceVcl(\"example\", ServiceVclArgs.builder() \n .name(\"my_vcl_service\")\n .build());\n\n var exampleAlert = new Alert(\"exampleAlert\", AlertArgs.builder() \n .name(\"my_vcl_service errors\")\n .serviceId(example.id())\n .source(\"stats\")\n .metric(\"status_5xx\")\n .evaluationStrategy(AlertEvaluationStrategyArgs.builder()\n .type(\"above_threshold\")\n .period(\"5m\")\n .threshold(10)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: fastly:ServiceVcl\n properties:\n name: my_vcl_service\n exampleAlert:\n type: fastly:Alert\n name: example\n properties:\n name: my_vcl_service errors\n serviceId: ${example.id}\n source: stats\n metric: status_5xx\n evaluationStrategy:\n type: above_threshold\n period: 5m\n threshold: 10\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nFastly Alerts can be imported using their ID, e.g.\n\n```sh\n$ pulumi import fastly:index/alert:Alert example xxxxxxxxxxxxxxxxxxxx\n```\n\n", + "description": "Provides a Fastly Alert. Alerts send notifications to custom integrations (e.g., Slack channels, PagerDuty, Microsoft Teams and New Relic) when an observed metric either exceeds or falls below a threshold.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst example = new fastly.ServiceVcl(\"example\", {name: \"my_vcl_service\"});\nconst exampleIntegration = new fastly.Integration(\"example\", {name: \"my_integration\"});\nconst exampleAlert = new fastly.Alert(\"example\", {\n name: \"my_vcl_service errors\",\n serviceId: example.id,\n source: \"stats\",\n metric: \"status_5xx\",\n evaluationStrategy: {\n type: \"above_threshold\",\n period: \"5m\",\n threshold: 10,\n },\n integrationIds: [exampleIntegration.id],\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\nexample = fastly.ServiceVcl(\"example\", name=\"my_vcl_service\")\nexample_integration = fastly.Integration(\"example\", name=\"my_integration\")\nexample_alert = fastly.Alert(\"example\",\n name=\"my_vcl_service errors\",\n service_id=example.id,\n source=\"stats\",\n metric=\"status_5xx\",\n evaluation_strategy=fastly.AlertEvaluationStrategyArgs(\n type=\"above_threshold\",\n period=\"5m\",\n threshold=10,\n ),\n integration_ids=[example_integration.id])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Fastly.ServiceVcl(\"example\", new()\n {\n Name = \"my_vcl_service\",\n });\n\n var exampleIntegration = new Fastly.Integration(\"example\", new()\n {\n Name = \"my_integration\",\n });\n\n var exampleAlert = new Fastly.Alert(\"example\", new()\n {\n Name = \"my_vcl_service errors\",\n ServiceId = example.Id,\n Source = \"stats\",\n Metric = \"status_5xx\",\n EvaluationStrategy = new Fastly.Inputs.AlertEvaluationStrategyArgs\n {\n Type = \"above_threshold\",\n Period = \"5m\",\n Threshold = 10,\n },\n IntegrationIds = new[]\n {\n exampleIntegration.Id,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := fastly.NewServiceVcl(ctx, \"example\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"my_vcl_service\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleIntegration, err := fastly.NewIntegration(ctx, \"example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my_integration\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewAlert(ctx, \"example\", \u0026fastly.AlertArgs{\n\t\t\tName: pulumi.String(\"my_vcl_service errors\"),\n\t\t\tServiceId: example.ID(),\n\t\t\tSource: pulumi.String(\"stats\"),\n\t\t\tMetric: pulumi.String(\"status_5xx\"),\n\t\t\tEvaluationStrategy: \u0026fastly.AlertEvaluationStrategyArgs{\n\t\t\t\tType: pulumi.String(\"above_threshold\"),\n\t\t\t\tPeriod: pulumi.String(\"5m\"),\n\t\t\t\tThreshold: pulumi.Float64(10),\n\t\t\t},\n\t\t\tIntegrationIds: pulumi.StringArray{\n\t\t\t\texampleIntegration.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.Integration;\nimport com.pulumi.fastly.IntegrationArgs;\nimport com.pulumi.fastly.Alert;\nimport com.pulumi.fastly.AlertArgs;\nimport com.pulumi.fastly.inputs.AlertEvaluationStrategyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ServiceVcl(\"example\", ServiceVclArgs.builder() \n .name(\"my_vcl_service\")\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder() \n .name(\"my_integration\")\n .build());\n\n var exampleAlert = new Alert(\"exampleAlert\", AlertArgs.builder() \n .name(\"my_vcl_service errors\")\n .serviceId(example.id())\n .source(\"stats\")\n .metric(\"status_5xx\")\n .evaluationStrategy(AlertEvaluationStrategyArgs.builder()\n .type(\"above_threshold\")\n .period(\"5m\")\n .threshold(10)\n .build())\n .integrationIds(exampleIntegration.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: fastly:ServiceVcl\n properties:\n name: my_vcl_service\n exampleIntegration:\n type: fastly:Integration\n name: example\n properties:\n name: my_integration\n exampleAlert:\n type: fastly:Alert\n name: example\n properties:\n name: my_vcl_service errors\n serviceId: ${example.id}\n source: stats\n metric: status_5xx\n evaluationStrategy:\n type: above_threshold\n period: 5m\n threshold: 10\n integrationIds:\n - ${exampleIntegration.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nFastly Alerts can be imported using their ID, e.g.\n\n```sh\n$ pulumi import fastly:index/alert:Alert example xxxxxxxxxxxxxxxxxxxx\n```\n\n", "properties": { "description": { "type": "string", @@ -4593,6 +4597,88 @@ "type": "object" } }, + "fastly:index/integration:Integration": { + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst mailinglistExample = new fastly.Integration(\"mailinglist_example\", {\n name: \"my mailing list integration\",\n description: \"example mailing list integration\",\n type: \"mailinglist\",\n config: {\n address: \"incoming-hook@my.domain.com\",\n },\n});\nconst microsoftteamsExample = new fastly.Integration(\"microsoftteams_example\", {\n name: \"my Microsoft Teams integration\",\n description: \"example Microsoft Teams integration\",\n type: \"microsoftteams\",\n config: {\n webhook: \"https://m365x012345.webhook.office.com\",\n },\n});\nconst newrelicExample = new fastly.Integration(\"newrelic_example\", {\n name: \"my New Relic integration\",\n description: \"example New Relic integration\",\n type: \"newrelic\",\n config: {\n account: \"XXXXXXX\",\n key: \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n },\n});\nconst pagerdutyExample = new fastly.Integration(\"pagerduty_example\", {\n name: \"my PagerDuty integration\",\n description: \"example PagerDuty integration\",\n type: \"pagerduty\",\n config: {\n key: \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n },\n});\nconst slackExample = new fastly.Integration(\"slack_example\", {\n name: \"my Slack integration\",\n description: \"example Slack integration\",\n type: \"slack\",\n config: {\n webhook: \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\",\n },\n});\nconst webhookExample = new fastly.Integration(\"webhook_example\", {\n name: \"my webhook integration\",\n description: \"example webhook integration\",\n type: \"webhook\",\n config: {\n webhook: \"https://my.domain.com/webhook\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\nmailinglist_example = fastly.Integration(\"mailinglist_example\",\n name=\"my mailing list integration\",\n description=\"example mailing list integration\",\n type=\"mailinglist\",\n config={\n \"address\": \"incoming-hook@my.domain.com\",\n })\nmicrosoftteams_example = fastly.Integration(\"microsoftteams_example\",\n name=\"my Microsoft Teams integration\",\n description=\"example Microsoft Teams integration\",\n type=\"microsoftteams\",\n config={\n \"webhook\": \"https://m365x012345.webhook.office.com\",\n })\nnewrelic_example = fastly.Integration(\"newrelic_example\",\n name=\"my New Relic integration\",\n description=\"example New Relic integration\",\n type=\"newrelic\",\n config={\n \"account\": \"XXXXXXX\",\n \"key\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n })\npagerduty_example = fastly.Integration(\"pagerduty_example\",\n name=\"my PagerDuty integration\",\n description=\"example PagerDuty integration\",\n type=\"pagerduty\",\n config={\n \"key\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n })\nslack_example = fastly.Integration(\"slack_example\",\n name=\"my Slack integration\",\n description=\"example Slack integration\",\n type=\"slack\",\n config={\n \"webhook\": \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\",\n })\nwebhook_example = fastly.Integration(\"webhook_example\",\n name=\"my webhook integration\",\n description=\"example webhook integration\",\n type=\"webhook\",\n config={\n \"webhook\": \"https://my.domain.com/webhook\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mailinglistExample = new Fastly.Integration(\"mailinglist_example\", new()\n {\n Name = \"my mailing list integration\",\n Description = \"example mailing list integration\",\n Type = \"mailinglist\",\n Config = \n {\n { \"address\", \"incoming-hook@my.domain.com\" },\n },\n });\n\n var microsoftteamsExample = new Fastly.Integration(\"microsoftteams_example\", new()\n {\n Name = \"my Microsoft Teams integration\",\n Description = \"example Microsoft Teams integration\",\n Type = \"microsoftteams\",\n Config = \n {\n { \"webhook\", \"https://m365x012345.webhook.office.com\" },\n },\n });\n\n var newrelicExample = new Fastly.Integration(\"newrelic_example\", new()\n {\n Name = \"my New Relic integration\",\n Description = \"example New Relic integration\",\n Type = \"newrelic\",\n Config = \n {\n { \"account\", \"XXXXXXX\" },\n { \"key\", \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" },\n },\n });\n\n var pagerdutyExample = new Fastly.Integration(\"pagerduty_example\", new()\n {\n Name = \"my PagerDuty integration\",\n Description = \"example PagerDuty integration\",\n Type = \"pagerduty\",\n Config = \n {\n { \"key\", \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" },\n },\n });\n\n var slackExample = new Fastly.Integration(\"slack_example\", new()\n {\n Name = \"my Slack integration\",\n Description = \"example Slack integration\",\n Type = \"slack\",\n Config = \n {\n { \"webhook\", \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\" },\n },\n });\n\n var webhookExample = new Fastly.Integration(\"webhook_example\", new()\n {\n Name = \"my webhook integration\",\n Description = \"example webhook integration\",\n Type = \"webhook\",\n Config = \n {\n { \"webhook\", \"https://my.domain.com/webhook\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := fastly.NewIntegration(ctx, \"mailinglist_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my mailing list integration\"),\n\t\t\tDescription: pulumi.String(\"example mailing list integration\"),\n\t\t\tType: pulumi.String(\"mailinglist\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"address\": pulumi.Any(\"incoming-hook@my.domain.com\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewIntegration(ctx, \"microsoftteams_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my Microsoft Teams integration\"),\n\t\t\tDescription: pulumi.String(\"example Microsoft Teams integration\"),\n\t\t\tType: pulumi.String(\"microsoftteams\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"webhook\": pulumi.Any(\"https://m365x012345.webhook.office.com\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewIntegration(ctx, \"newrelic_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my New Relic integration\"),\n\t\t\tDescription: pulumi.String(\"example New Relic integration\"),\n\t\t\tType: pulumi.String(\"newrelic\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"account\": pulumi.Any(\"XXXXXXX\"),\n\t\t\t\t\"key\": pulumi.Any(\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewIntegration(ctx, \"pagerduty_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my PagerDuty integration\"),\n\t\t\tDescription: pulumi.String(\"example PagerDuty integration\"),\n\t\t\tType: pulumi.String(\"pagerduty\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"key\": pulumi.Any(\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewIntegration(ctx, \"slack_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my Slack integration\"),\n\t\t\tDescription: pulumi.String(\"example Slack integration\"),\n\t\t\tType: pulumi.String(\"slack\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"webhook\": pulumi.Any(\"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewIntegration(ctx, \"webhook_example\", \u0026fastly.IntegrationArgs{\n\t\t\tName: pulumi.String(\"my webhook integration\"),\n\t\t\tDescription: pulumi.String(\"example webhook integration\"),\n\t\t\tType: pulumi.String(\"webhook\"),\n\t\t\tConfig: pulumi.Map{\n\t\t\t\t\"webhook\": pulumi.Any(\"https://my.domain.com/webhook\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.Integration;\nimport com.pulumi.fastly.IntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mailinglistExample = new Integration(\"mailinglistExample\", IntegrationArgs.builder() \n .name(\"my mailing list integration\")\n .description(\"example mailing list integration\")\n .type(\"mailinglist\")\n .config(Map.of(\"address\", \"incoming-hook@my.domain.com\"))\n .build());\n\n var microsoftteamsExample = new Integration(\"microsoftteamsExample\", IntegrationArgs.builder() \n .name(\"my Microsoft Teams integration\")\n .description(\"example Microsoft Teams integration\")\n .type(\"microsoftteams\")\n .config(Map.of(\"webhook\", \"https://m365x012345.webhook.office.com\"))\n .build());\n\n var newrelicExample = new Integration(\"newrelicExample\", IntegrationArgs.builder() \n .name(\"my New Relic integration\")\n .description(\"example New Relic integration\")\n .type(\"newrelic\")\n .config(Map.ofEntries(\n Map.entry(\"account\", \"XXXXXXX\"),\n Map.entry(\"key\", \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\")\n ))\n .build());\n\n var pagerdutyExample = new Integration(\"pagerdutyExample\", IntegrationArgs.builder() \n .name(\"my PagerDuty integration\")\n .description(\"example PagerDuty integration\")\n .type(\"pagerduty\")\n .config(Map.of(\"key\", \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"))\n .build());\n\n var slackExample = new Integration(\"slackExample\", IntegrationArgs.builder() \n .name(\"my Slack integration\")\n .description(\"example Slack integration\")\n .type(\"slack\")\n .config(Map.of(\"webhook\", \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\"))\n .build());\n\n var webhookExample = new Integration(\"webhookExample\", IntegrationArgs.builder() \n .name(\"my webhook integration\")\n .description(\"example webhook integration\")\n .type(\"webhook\")\n .config(Map.of(\"webhook\", \"https://my.domain.com/webhook\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mailinglistExample:\n type: fastly:Integration\n name: mailinglist_example\n properties:\n name: my mailing list integration\n description: example mailing list integration\n type: mailinglist\n config:\n address: incoming-hook@my.domain.com\n microsoftteamsExample:\n type: fastly:Integration\n name: microsoftteams_example\n properties:\n name: my Microsoft Teams integration\n description: example Microsoft Teams integration\n type: microsoftteams\n config:\n webhook: https://m365x012345.webhook.office.com\n newrelicExample:\n type: fastly:Integration\n name: newrelic_example\n properties:\n name: my New Relic integration\n description: example New Relic integration\n type: newrelic\n config:\n account: XXXXXXX\n key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n pagerdutyExample:\n type: fastly:Integration\n name: pagerduty_example\n properties:\n name: my PagerDuty integration\n description: example PagerDuty integration\n type: pagerduty\n config:\n key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n slackExample:\n type: fastly:Integration\n name: slack_example\n properties:\n name: my Slack integration\n description: example Slack integration\n type: slack\n config:\n webhook: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\n webhookExample:\n type: fastly:Integration\n name: webhook_example\n properties:\n name: my webhook integration\n description: example webhook integration\n type: webhook\n config:\n webhook: https://my.domain.com/webhook\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "properties": { + "config": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "Configuration specific to the integration `type` (see documentation examples).\n", + "secret": true + }, + "description": { + "type": "string", + "description": "User submitted description of the integration.\n" + }, + "name": { + "type": "string", + "description": "User submitted name of the integration.\n" + }, + "type": { + "type": "string", + "description": "Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`.\n" + } + }, + "required": [ + "config", + "name", + "type" + ], + "inputProperties": { + "config": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "Configuration specific to the integration `type` (see documentation examples).\n", + "secret": true + }, + "description": { + "type": "string", + "description": "User submitted description of the integration.\n" + }, + "name": { + "type": "string", + "description": "User submitted name of the integration.\n" + }, + "type": { + "type": "string", + "description": "Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`.\n" + } + }, + "requiredInputs": [ + "config", + "type" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering Integration resources.\n", + "properties": { + "config": { + "type": "object", + "additionalProperties": { + "$ref": "pulumi.json#/Any" + }, + "description": "Configuration specific to the integration `type` (see documentation examples).\n", + "secret": true + }, + "description": { + "type": "string", + "description": "User submitted description of the integration.\n" + }, + "name": { + "type": "string", + "description": "User submitted name of the integration.\n" + }, + "type": { + "type": "string", + "description": "Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`.\n" + } + }, + "type": "object" + } + }, "fastly:index/kvstore:Kvstore": { "description": "## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\n// IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n// This requires a two-step `pulumi up` as we can't guarantee deletion order.\n// e.g. resource_link deletion within fastly_service_compute might not finish first.\nconst exampleKvstore = new fastly.Kvstore(\"example\", {name: \"my_kv_store\"});\nconst example = fastly.getPackageHash({\n filename: \"package.tar.gz\",\n});\nconst exampleServiceCompute = new fastly.ServiceCompute(\"example\", {\n name: \"my_compute_service\",\n domains: [{\n name: \"demo.example.com\",\n }],\n \"package\": {\n filename: \"package.tar.gz\",\n sourceCodeHash: example.then(example =\u003e example.hash),\n },\n resourceLinks: [{\n name: \"my_resource_link\",\n resourceId: exampleKvstore.id,\n }],\n forceDestroy: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\n# IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n# This requires a two-step `pulumi up` as we can't guarantee deletion order.\n# e.g. resource_link deletion within fastly_service_compute might not finish first.\nexample_kvstore = fastly.Kvstore(\"example\", name=\"my_kv_store\")\nexample = fastly.get_package_hash(filename=\"package.tar.gz\")\nexample_service_compute = fastly.ServiceCompute(\"example\",\n name=\"my_compute_service\",\n domains=[fastly.ServiceComputeDomainArgs(\n name=\"demo.example.com\",\n )],\n package=fastly.ServiceComputePackageArgs(\n filename=\"package.tar.gz\",\n source_code_hash=example.hash,\n ),\n resource_links=[fastly.ServiceComputeResourceLinkArgs(\n name=\"my_resource_link\",\n resource_id=example_kvstore.id,\n )],\n force_destroy=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n // This requires a two-step `pulumi up` as we can't guarantee deletion order.\n // e.g. resource_link deletion within fastly_service_compute might not finish first.\n var exampleKvstore = new Fastly.Kvstore(\"example\", new()\n {\n Name = \"my_kv_store\",\n });\n\n var example = Fastly.GetPackageHash.Invoke(new()\n {\n Filename = \"package.tar.gz\",\n });\n\n var exampleServiceCompute = new Fastly.ServiceCompute(\"example\", new()\n {\n Name = \"my_compute_service\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceComputeDomainArgs\n {\n Name = \"demo.example.com\",\n },\n },\n Package = new Fastly.Inputs.ServiceComputePackageArgs\n {\n Filename = \"package.tar.gz\",\n SourceCodeHash = example.Apply(getPackageHashResult =\u003e getPackageHashResult.Hash),\n },\n ResourceLinks = new[]\n {\n new Fastly.Inputs.ServiceComputeResourceLinkArgs\n {\n Name = \"my_resource_link\",\n ResourceId = exampleKvstore.Id,\n },\n },\n ForceDestroy = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n\t\t// This requires a two-step `pulumi up` as we can't guarantee deletion order.\n\t\t// e.g. resource_link deletion within fastly_service_compute might not finish first.\n\t\texampleKvstore, err := fastly.NewKvstore(ctx, \"example\", \u0026fastly.KvstoreArgs{\n\t\t\tName: pulumi.String(\"my_kv_store\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := fastly.GetPackageHash(ctx, \u0026fastly.GetPackageHashArgs{\n\t\t\tFilename: pulumi.StringRef(\"package.tar.gz\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fastly.NewServiceCompute(ctx, \"example\", \u0026fastly.ServiceComputeArgs{\n\t\t\tName: pulumi.String(\"my_compute_service\"),\n\t\t\tDomains: fastly.ServiceComputeDomainArray{\n\t\t\t\t\u0026fastly.ServiceComputeDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"demo.example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tPackage: \u0026fastly.ServiceComputePackageArgs{\n\t\t\t\tFilename: pulumi.String(\"package.tar.gz\"),\n\t\t\t\tSourceCodeHash: pulumi.String(example.Hash),\n\t\t\t},\n\t\t\tResourceLinks: fastly.ServiceComputeResourceLinkArray{\n\t\t\t\t\u0026fastly.ServiceComputeResourceLinkArgs{\n\t\t\t\t\tName: pulumi.String(\"my_resource_link\"),\n\t\t\t\t\tResourceId: exampleKvstore.ID(),\n\t\t\t\t},\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.Kvstore;\nimport com.pulumi.fastly.KvstoreArgs;\nimport com.pulumi.fastly.FastlyFunctions;\nimport com.pulumi.fastly.inputs.GetPackageHashArgs;\nimport com.pulumi.fastly.ServiceCompute;\nimport com.pulumi.fastly.ServiceComputeArgs;\nimport com.pulumi.fastly.inputs.ServiceComputeDomainArgs;\nimport com.pulumi.fastly.inputs.ServiceComputePackageArgs;\nimport com.pulumi.fastly.inputs.ServiceComputeResourceLinkArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n // This requires a two-step `pulumi up` as we can't guarantee deletion order.\n // e.g. resource_link deletion within fastly_service_compute might not finish first.\n var exampleKvstore = new Kvstore(\"exampleKvstore\", KvstoreArgs.builder() \n .name(\"my_kv_store\")\n .build());\n\n final var example = FastlyFunctions.getPackageHash(GetPackageHashArgs.builder()\n .filename(\"package.tar.gz\")\n .build());\n\n var exampleServiceCompute = new ServiceCompute(\"exampleServiceCompute\", ServiceComputeArgs.builder() \n .name(\"my_compute_service\")\n .domains(ServiceComputeDomainArgs.builder()\n .name(\"demo.example.com\")\n .build())\n .package_(ServiceComputePackageArgs.builder()\n .filename(\"package.tar.gz\")\n .sourceCodeHash(example.applyValue(getPackageHashResult -\u003e getPackageHashResult.hash()))\n .build())\n .resourceLinks(ServiceComputeResourceLinkArgs.builder()\n .name(\"my_resource_link\")\n .resourceId(exampleKvstore.id())\n .build())\n .forceDestroy(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # IMPORTANT: Deleting a KV Store requires first deleting its resource_link.\n # This requires a two-step `pulumi up` as we can't guarantee deletion order.\n # e.g. resource_link deletion within fastly_service_compute might not finish first.\n exampleKvstore:\n type: fastly:Kvstore\n name: example\n properties:\n name: my_kv_store\n exampleServiceCompute:\n type: fastly:ServiceCompute\n name: example\n properties:\n name: my_compute_service\n domains:\n - name: demo.example.com\n package:\n filename: package.tar.gz\n sourceCodeHash: ${example.hash}\n resourceLinks:\n - name: my_resource_link\n resourceId: ${exampleKvstore.id}\n forceDestroy: true\nvariables:\n example:\n fn::invoke:\n Function: fastly:getPackageHash\n Arguments:\n filename: package.tar.gz\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nFastly KV Stores can be imported using their Store ID, e.g.\n\n```sh\n$ pulumi import fastly:index/kvstore:Kvstore example xxxxxxxxxxxxxxxxxxxx\n```\n\n", "properties": { @@ -8900,14 +8986,17 @@ } }, "fastly:index/getVclSnippets:getVclSnippets": { + "description": "VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL.\n\nUse this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as fastly from \"@pulumi/fastly\";\n\nconst exampleServiceVcl = new fastly.ServiceVcl(\"example\", {\n name: \"Example Service\",\n domains: [{\n name: \"example.com\",\n }],\n forceDestroy: true,\n});\nconst example = fastly.getVclSnippetsOutput({\n serviceId: exampleServiceVcl.id,\n serviceVersion: exampleServiceVcl.activeVersion,\n});\nexport const serviceVclSnippets = example;\n```\n```python\nimport pulumi\nimport pulumi_fastly as fastly\n\nexample_service_vcl = fastly.ServiceVcl(\"example\",\n name=\"Example Service\",\n domains=[fastly.ServiceVclDomainArgs(\n name=\"example.com\",\n )],\n force_destroy=True)\nexample = fastly.get_vcl_snippets_output(service_id=example_service_vcl.id,\n service_version=example_service_vcl.active_version)\npulumi.export(\"serviceVclSnippets\", example)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Fastly = Pulumi.Fastly;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleServiceVcl = new Fastly.ServiceVcl(\"example\", new()\n {\n Name = \"Example Service\",\n Domains = new[]\n {\n new Fastly.Inputs.ServiceVclDomainArgs\n {\n Name = \"example.com\",\n },\n },\n ForceDestroy = true,\n });\n\n var example = Fastly.GetVclSnippets.Invoke(new()\n {\n ServiceId = exampleServiceVcl.Id,\n ServiceVersion = exampleServiceVcl.ActiveVersion,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"serviceVclSnippets\"] = example,\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleServiceVcl, err := fastly.NewServiceVcl(ctx, \"example\", \u0026fastly.ServiceVclArgs{\n\t\t\tName: pulumi.String(\"Example Service\"),\n\t\t\tDomains: fastly.ServiceVclDomainArray{\n\t\t\t\t\u0026fastly.ServiceVclDomainArgs{\n\t\t\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := fastly.GetVclSnippetsOutput(ctx, fastly.GetVclSnippetsOutputArgs{\n\t\t\tServiceId: exampleServiceVcl.ID(),\n\t\t\tServiceVersion: exampleServiceVcl.ActiveVersion,\n\t\t}, nil)\n\t\tctx.Export(\"serviceVclSnippets\", example)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.fastly.ServiceVcl;\nimport com.pulumi.fastly.ServiceVclArgs;\nimport com.pulumi.fastly.inputs.ServiceVclDomainArgs;\nimport com.pulumi.fastly.FastlyFunctions;\nimport com.pulumi.fastly.inputs.GetVclSnippetsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleServiceVcl = new ServiceVcl(\"exampleServiceVcl\", ServiceVclArgs.builder() \n .name(\"Example Service\")\n .domains(ServiceVclDomainArgs.builder()\n .name(\"example.com\")\n .build())\n .forceDestroy(true)\n .build());\n\n final var example = FastlyFunctions.getVclSnippets(GetVclSnippetsArgs.builder()\n .serviceId(exampleServiceVcl.id())\n .serviceVersion(exampleServiceVcl.activeVersion())\n .build());\n\n ctx.export(\"serviceVclSnippets\", example.applyValue(getVclSnippetsResult -\u003e getVclSnippetsResult));\n }\n}\n```\n```yaml\nresources:\n exampleServiceVcl:\n type: fastly:ServiceVcl\n name: example\n properties:\n name: Example Service\n domains:\n - name: example.com\n forceDestroy: true\nvariables:\n example:\n fn::invoke:\n Function: fastly:getVclSnippets\n Arguments:\n serviceId: ${exampleServiceVcl.id}\n serviceVersion: ${exampleServiceVcl.activeVersion}\noutputs:\n serviceVclSnippets: ${example}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n[1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/\n", "inputs": { "description": "A collection of arguments for invoking getVclSnippets.\n", "properties": { "serviceId": { - "type": "string" + "type": "string", + "description": "Alphanumeric string identifying the service.\n" }, "serviceVersion": { - "type": "integer" + "type": "integer", + "description": "Integer identifying a service version.\n" } }, "type": "object", @@ -8924,12 +9013,15 @@ "type": "string" }, "serviceId": { + "description": "Alphanumeric string identifying the service.\n", "type": "string" }, "serviceVersion": { + "description": "Integer identifying a service version.\n", "type": "integer" }, "vclSnippets": { + "description": "List of all VCL snippets for the version of the service.\n", "items": { "$ref": "#/types/fastly:index/getVclSnippetsVclSnippet:getVclSnippetsVclSnippet" }, diff --git a/provider/go.mod b/provider/go.mod index 6a0a4e40..c85dec0e 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -30,7 +30,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-cidr v1.1.0 // indirect @@ -207,7 +207,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/zclconf/go-cty v1.14.2 // indirect + github.com/zclconf/go-cty v1.14.4 // indirect github.com/zclconf/go-cty-yaml v1.0.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect @@ -218,15 +218,15 @@ require ( go.uber.org/atomic v1.9.0 // indirect gocloud.dev v0.37.0 // indirect gocloud.dev/secrets/hashivault v0.27.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect diff --git a/provider/go.sum b/provider/go.sum index c8e80b1d..1c2c52e2 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1277,8 +1277,9 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -2223,8 +2224,9 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hc-install v0.6.2/go.mod h1:2JBpd+NCFKiHiu/yYCGaPyPHhZLxXTpz8oreHa/a3Ps= -github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= +github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0= +github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -3048,8 +3050,9 @@ github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= +github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= @@ -3228,8 +3231,8 @@ golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -3295,8 +3298,9 @@ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -3401,8 +3405,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -3636,8 +3640,8 @@ golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -3661,8 +3665,8 @@ golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3683,8 +3687,9 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/sdk/dotnet/Alert.cs b/sdk/dotnet/Alert.cs index 6368b4fd..bc0f23fc 100644 --- a/sdk/dotnet/Alert.cs +++ b/sdk/dotnet/Alert.cs @@ -27,6 +27,11 @@ namespace Pulumi.Fastly /// Name = "my_vcl_service", /// }); /// + /// var exampleIntegration = new Fastly.Integration("example", new() + /// { + /// Name = "my_integration", + /// }); + /// /// var exampleAlert = new Fastly.Alert("example", new() /// { /// Name = "my_vcl_service errors", @@ -39,6 +44,10 @@ namespace Pulumi.Fastly /// Period = "5m", /// Threshold = 10, /// }, + /// IntegrationIds = new[] + /// { + /// exampleIntegration.Id, + /// }, /// }); /// /// }); diff --git a/sdk/dotnet/GetVclSnippets.cs b/sdk/dotnet/GetVclSnippets.cs index dc2e0699..b8a32846 100644 --- a/sdk/dotnet/GetVclSnippets.cs +++ b/sdk/dotnet/GetVclSnippets.cs @@ -11,9 +11,95 @@ namespace Pulumi.Fastly { public static class GetVclSnippets { + /// + /// VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + /// + /// Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Fastly = Pulumi.Fastly; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleServiceVcl = new Fastly.ServiceVcl("example", new() + /// { + /// Name = "Example Service", + /// Domains = new[] + /// { + /// new Fastly.Inputs.ServiceVclDomainArgs + /// { + /// Name = "example.com", + /// }, + /// }, + /// ForceDestroy = true, + /// }); + /// + /// var example = Fastly.GetVclSnippets.Invoke(new() + /// { + /// ServiceId = exampleServiceVcl.Id, + /// ServiceVersion = exampleServiceVcl.ActiveVersion, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["serviceVclSnippets"] = example, + /// }; + /// }); + /// ``` + /// + /// [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + /// public static Task InvokeAsync(GetVclSnippetsArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("fastly:index/getVclSnippets:getVclSnippets", args ?? new GetVclSnippetsArgs(), options.WithDefaults()); + /// + /// VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + /// + /// Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Fastly = Pulumi.Fastly; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleServiceVcl = new Fastly.ServiceVcl("example", new() + /// { + /// Name = "Example Service", + /// Domains = new[] + /// { + /// new Fastly.Inputs.ServiceVclDomainArgs + /// { + /// Name = "example.com", + /// }, + /// }, + /// ForceDestroy = true, + /// }); + /// + /// var example = Fastly.GetVclSnippets.Invoke(new() + /// { + /// ServiceId = exampleServiceVcl.Id, + /// ServiceVersion = exampleServiceVcl.ActiveVersion, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["serviceVclSnippets"] = example, + /// }; + /// }); + /// ``` + /// + /// [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + /// public static Output Invoke(GetVclSnippetsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("fastly:index/getVclSnippets:getVclSnippets", args ?? new GetVclSnippetsInvokeArgs(), options.WithDefaults()); } @@ -21,9 +107,15 @@ public static Output Invoke(GetVclSnippetsInvokeArgs args, public sealed class GetVclSnippetsArgs : global::Pulumi.InvokeArgs { + /// + /// Alphanumeric string identifying the service. + /// [Input("serviceId", required: true)] public string ServiceId { get; set; } = null!; + /// + /// Integer identifying a service version. + /// [Input("serviceVersion", required: true)] public int ServiceVersion { get; set; } @@ -35,9 +127,15 @@ public GetVclSnippetsArgs() public sealed class GetVclSnippetsInvokeArgs : global::Pulumi.InvokeArgs { + /// + /// Alphanumeric string identifying the service. + /// [Input("serviceId", required: true)] public Input ServiceId { get; set; } = null!; + /// + /// Integer identifying a service version. + /// [Input("serviceVersion", required: true)] public Input ServiceVersion { get; set; } = null!; @@ -55,8 +153,17 @@ public sealed class GetVclSnippetsResult /// The provider-assigned unique ID for this managed resource. /// public readonly string Id; + /// + /// Alphanumeric string identifying the service. + /// public readonly string ServiceId; + /// + /// Integer identifying a service version. + /// public readonly int ServiceVersion; + /// + /// List of all VCL snippets for the version of the service. + /// public readonly ImmutableArray VclSnippets; [OutputConstructor] diff --git a/sdk/dotnet/Inputs/AlertEvaluationStrategyArgs.cs b/sdk/dotnet/Inputs/AlertEvaluationStrategyArgs.cs index 14480495..4e94a654 100644 --- a/sdk/dotnet/Inputs/AlertEvaluationStrategyArgs.cs +++ b/sdk/dotnet/Inputs/AlertEvaluationStrategyArgs.cs @@ -13,7 +13,13 @@ namespace Pulumi.Fastly.Inputs public sealed class AlertEvaluationStrategyArgs : global::Pulumi.ResourceArgs { /// - /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + /// Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + /// + [Input("ignoreBelow")] + public Input? IgnoreBelow { get; set; } + + /// + /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. /// [Input("period", required: true)] public Input Period { get; set; } = null!; @@ -25,7 +31,7 @@ public sealed class AlertEvaluationStrategyArgs : global::Pulumi.ResourceArgs public Input Threshold { get; set; } = null!; /// - /// Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + /// Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. /// [Input("type", required: true)] public Input Type { get; set; } = null!; diff --git a/sdk/dotnet/Inputs/AlertEvaluationStrategyGetArgs.cs b/sdk/dotnet/Inputs/AlertEvaluationStrategyGetArgs.cs index dbc7452b..903bc709 100644 --- a/sdk/dotnet/Inputs/AlertEvaluationStrategyGetArgs.cs +++ b/sdk/dotnet/Inputs/AlertEvaluationStrategyGetArgs.cs @@ -13,7 +13,13 @@ namespace Pulumi.Fastly.Inputs public sealed class AlertEvaluationStrategyGetArgs : global::Pulumi.ResourceArgs { /// - /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + /// Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + /// + [Input("ignoreBelow")] + public Input? IgnoreBelow { get; set; } + + /// + /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. /// [Input("period", required: true)] public Input Period { get; set; } = null!; @@ -25,7 +31,7 @@ public sealed class AlertEvaluationStrategyGetArgs : global::Pulumi.ResourceArgs public Input Threshold { get; set; } = null!; /// - /// Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + /// Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. /// [Input("type", required: true)] public Input Type { get; set; } = null!; diff --git a/sdk/dotnet/Integration.cs b/sdk/dotnet/Integration.cs new file mode 100644 index 00000000..1eb6cf33 --- /dev/null +++ b/sdk/dotnet/Integration.cs @@ -0,0 +1,251 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Fastly +{ + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Fastly = Pulumi.Fastly; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var mailinglistExample = new Fastly.Integration("mailinglist_example", new() + /// { + /// Name = "my mailing list integration", + /// Description = "example mailing list integration", + /// Type = "mailinglist", + /// Config = + /// { + /// { "address", "incoming-hook@my.domain.com" }, + /// }, + /// }); + /// + /// var microsoftteamsExample = new Fastly.Integration("microsoftteams_example", new() + /// { + /// Name = "my Microsoft Teams integration", + /// Description = "example Microsoft Teams integration", + /// Type = "microsoftteams", + /// Config = + /// { + /// { "webhook", "https://m365x012345.webhook.office.com" }, + /// }, + /// }); + /// + /// var newrelicExample = new Fastly.Integration("newrelic_example", new() + /// { + /// Name = "my New Relic integration", + /// Description = "example New Relic integration", + /// Type = "newrelic", + /// Config = + /// { + /// { "account", "XXXXXXX" }, + /// { "key", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }, + /// }, + /// }); + /// + /// var pagerdutyExample = new Fastly.Integration("pagerduty_example", new() + /// { + /// Name = "my PagerDuty integration", + /// Description = "example PagerDuty integration", + /// Type = "pagerduty", + /// Config = + /// { + /// { "key", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }, + /// }, + /// }); + /// + /// var slackExample = new Fastly.Integration("slack_example", new() + /// { + /// Name = "my Slack integration", + /// Description = "example Slack integration", + /// Type = "slack", + /// Config = + /// { + /// { "webhook", "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX" }, + /// }, + /// }); + /// + /// var webhookExample = new Fastly.Integration("webhook_example", new() + /// { + /// Name = "my webhook integration", + /// Description = "example webhook integration", + /// Type = "webhook", + /// Config = + /// { + /// { "webhook", "https://my.domain.com/webhook" }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + [FastlyResourceType("fastly:index/integration:Integration")] + public partial class Integration : global::Pulumi.CustomResource + { + /// + /// Configuration specific to the integration `type` (see documentation examples). + /// + [Output("config")] + public Output> Config { get; private set; } = null!; + + /// + /// User submitted description of the integration. + /// + [Output("description")] + public Output Description { get; private set; } = null!; + + /// + /// User submitted name of the integration. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a Integration resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public Integration(string name, IntegrationArgs args, CustomResourceOptions? options = null) + : base("fastly:index/integration:Integration", name, args ?? new IntegrationArgs(), MakeResourceOptions(options, "")) + { + } + + private Integration(string name, Input id, IntegrationState? state = null, CustomResourceOptions? options = null) + : base("fastly:index/integration:Integration", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + AdditionalSecretOutputs = + { + "config", + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing Integration resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static Integration Get(string name, Input id, IntegrationState? state = null, CustomResourceOptions? options = null) + { + return new Integration(name, id, state, options); + } + } + + public sealed class IntegrationArgs : global::Pulumi.ResourceArgs + { + [Input("config", required: true)] + private InputMap? _config; + + /// + /// Configuration specific to the integration `type` (see documentation examples). + /// + public InputMap Config + { + get => _config ?? (_config = new InputMap()); + set + { + var emptySecret = Output.CreateSecret(ImmutableDictionary.Create()); + _config = Output.All(value, emptySecret).Apply(v => v[0]); + } + } + + /// + /// User submitted description of the integration. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// User submitted name of the integration. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + /// + [Input("type", required: true)] + public Input Type { get; set; } = null!; + + public IntegrationArgs() + { + } + public static new IntegrationArgs Empty => new IntegrationArgs(); + } + + public sealed class IntegrationState : global::Pulumi.ResourceArgs + { + [Input("config")] + private InputMap? _config; + + /// + /// Configuration specific to the integration `type` (see documentation examples). + /// + public InputMap Config + { + get => _config ?? (_config = new InputMap()); + set + { + var emptySecret = Output.CreateSecret(ImmutableDictionary.Create()); + _config = Output.All(value, emptySecret).Apply(v => v[0]); + } + } + + /// + /// User submitted description of the integration. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// User submitted name of the integration. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + /// + [Input("type")] + public Input? Type { get; set; } + + public IntegrationState() + { + } + public static new IntegrationState Empty => new IntegrationState(); + } +} diff --git a/sdk/dotnet/Outputs/AlertEvaluationStrategy.cs b/sdk/dotnet/Outputs/AlertEvaluationStrategy.cs index d86314ab..495075cb 100644 --- a/sdk/dotnet/Outputs/AlertEvaluationStrategy.cs +++ b/sdk/dotnet/Outputs/AlertEvaluationStrategy.cs @@ -14,7 +14,11 @@ namespace Pulumi.Fastly.Outputs public sealed class AlertEvaluationStrategy { /// - /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + /// Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + /// + public readonly double? IgnoreBelow; + /// + /// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. /// public readonly string Period; /// @@ -22,18 +26,21 @@ public sealed class AlertEvaluationStrategy /// public readonly double Threshold; /// - /// Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + /// Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. /// public readonly string Type; [OutputConstructor] private AlertEvaluationStrategy( + double? ignoreBelow, + string period, double threshold, string type) { + IgnoreBelow = ignoreBelow; Period = period; Threshold = threshold; Type = type; diff --git a/sdk/go/fastly/alert.go b/sdk/go/fastly/alert.go index 06a00e48..cc958593 100644 --- a/sdk/go/fastly/alert.go +++ b/sdk/go/fastly/alert.go @@ -34,6 +34,12 @@ import ( // if err != nil { // return err // } +// exampleIntegration, err := fastly.NewIntegration(ctx, "example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my_integration"), +// }) +// if err != nil { +// return err +// } // _, err = fastly.NewAlert(ctx, "example", &fastly.AlertArgs{ // Name: pulumi.String("my_vcl_service errors"), // ServiceId: example.ID(), @@ -44,6 +50,9 @@ import ( // Period: pulumi.String("5m"), // Threshold: pulumi.Float64(10), // }, +// IntegrationIds: pulumi.StringArray{ +// exampleIntegration.ID(), +// }, // }) // if err != nil { // return err diff --git a/sdk/go/fastly/getVclSnippets.go b/sdk/go/fastly/getVclSnippets.go index ab3ff166..34e1c6e4 100644 --- a/sdk/go/fastly/getVclSnippets.go +++ b/sdk/go/fastly/getVclSnippets.go @@ -11,6 +11,48 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +// VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. +// +// Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// exampleServiceVcl, err := fastly.NewServiceVcl(ctx, "example", &fastly.ServiceVclArgs{ +// Name: pulumi.String("Example Service"), +// Domains: fastly.ServiceVclDomainArray{ +// &fastly.ServiceVclDomainArgs{ +// Name: pulumi.String("example.com"), +// }, +// }, +// ForceDestroy: pulumi.Bool(true), +// }) +// if err != nil { +// return err +// } +// example := fastly.GetVclSnippetsOutput(ctx, fastly.GetVclSnippetsOutputArgs{ +// ServiceId: exampleServiceVcl.ID(), +// ServiceVersion: exampleServiceVcl.ActiveVersion, +// }, nil) +// ctx.Export("serviceVclSnippets", example) +// return nil +// }) +// } +// +// ``` +// +// [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ func GetVclSnippets(ctx *pulumi.Context, args *GetVclSnippetsArgs, opts ...pulumi.InvokeOption) (*GetVclSnippetsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetVclSnippetsResult @@ -23,17 +65,22 @@ func GetVclSnippets(ctx *pulumi.Context, args *GetVclSnippetsArgs, opts ...pulum // A collection of arguments for invoking getVclSnippets. type GetVclSnippetsArgs struct { - ServiceId string `pulumi:"serviceId"` - ServiceVersion int `pulumi:"serviceVersion"` + // Alphanumeric string identifying the service. + ServiceId string `pulumi:"serviceId"` + // Integer identifying a service version. + ServiceVersion int `pulumi:"serviceVersion"` } // A collection of values returned by getVclSnippets. type GetVclSnippetsResult struct { // The provider-assigned unique ID for this managed resource. - Id string `pulumi:"id"` - ServiceId string `pulumi:"serviceId"` - ServiceVersion int `pulumi:"serviceVersion"` - VclSnippets []GetVclSnippetsVclSnippet `pulumi:"vclSnippets"` + Id string `pulumi:"id"` + // Alphanumeric string identifying the service. + ServiceId string `pulumi:"serviceId"` + // Integer identifying a service version. + ServiceVersion int `pulumi:"serviceVersion"` + // List of all VCL snippets for the version of the service. + VclSnippets []GetVclSnippetsVclSnippet `pulumi:"vclSnippets"` } func GetVclSnippetsOutput(ctx *pulumi.Context, args GetVclSnippetsOutputArgs, opts ...pulumi.InvokeOption) GetVclSnippetsResultOutput { @@ -51,8 +98,10 @@ func GetVclSnippetsOutput(ctx *pulumi.Context, args GetVclSnippetsOutputArgs, op // A collection of arguments for invoking getVclSnippets. type GetVclSnippetsOutputArgs struct { - ServiceId pulumi.StringInput `pulumi:"serviceId"` - ServiceVersion pulumi.IntInput `pulumi:"serviceVersion"` + // Alphanumeric string identifying the service. + ServiceId pulumi.StringInput `pulumi:"serviceId"` + // Integer identifying a service version. + ServiceVersion pulumi.IntInput `pulumi:"serviceVersion"` } func (GetVclSnippetsOutputArgs) ElementType() reflect.Type { @@ -79,14 +128,17 @@ func (o GetVclSnippetsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetVclSnippetsResult) string { return v.Id }).(pulumi.StringOutput) } +// Alphanumeric string identifying the service. func (o GetVclSnippetsResultOutput) ServiceId() pulumi.StringOutput { return o.ApplyT(func(v GetVclSnippetsResult) string { return v.ServiceId }).(pulumi.StringOutput) } +// Integer identifying a service version. func (o GetVclSnippetsResultOutput) ServiceVersion() pulumi.IntOutput { return o.ApplyT(func(v GetVclSnippetsResult) int { return v.ServiceVersion }).(pulumi.IntOutput) } +// List of all VCL snippets for the version of the service. func (o GetVclSnippetsResultOutput) VclSnippets() GetVclSnippetsVclSnippetArrayOutput { return o.ApplyT(func(v GetVclSnippetsResult) []GetVclSnippetsVclSnippet { return v.VclSnippets }).(GetVclSnippetsVclSnippetArrayOutput) } diff --git a/sdk/go/fastly/init.go b/sdk/go/fastly/init.go index 5bc6314f..79c84263 100644 --- a/sdk/go/fastly/init.go +++ b/sdk/go/fastly/init.go @@ -27,6 +27,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Configstore{} case "fastly:index/configstoreEntries:ConfigstoreEntries": r = &ConfigstoreEntries{} + case "fastly:index/integration:Integration": + r = &Integration{} case "fastly:index/kvstore:Kvstore": r = &Kvstore{} case "fastly:index/secretstore:Secretstore": @@ -107,6 +109,11 @@ func init() { "index/configstoreEntries", &module{version}, ) + pulumi.RegisterResourceModule( + "fastly", + "index/integration", + &module{version}, + ) pulumi.RegisterResourceModule( "fastly", "index/kvstore", diff --git a/sdk/go/fastly/integration.go b/sdk/go/fastly/integration.go new file mode 100644 index 00000000..9c24abc1 --- /dev/null +++ b/sdk/go/fastly/integration.go @@ -0,0 +1,359 @@ +// 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 fastly + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := fastly.NewIntegration(ctx, "mailinglist_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my mailing list integration"), +// Description: pulumi.String("example mailing list integration"), +// Type: pulumi.String("mailinglist"), +// Config: pulumi.Map{ +// "address": pulumi.Any("incoming-hook@my.domain.com"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fastly.NewIntegration(ctx, "microsoftteams_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my Microsoft Teams integration"), +// Description: pulumi.String("example Microsoft Teams integration"), +// Type: pulumi.String("microsoftteams"), +// Config: pulumi.Map{ +// "webhook": pulumi.Any("https://m365x012345.webhook.office.com"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fastly.NewIntegration(ctx, "newrelic_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my New Relic integration"), +// Description: pulumi.String("example New Relic integration"), +// Type: pulumi.String("newrelic"), +// Config: pulumi.Map{ +// "account": pulumi.Any("XXXXXXX"), +// "key": pulumi.Any("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fastly.NewIntegration(ctx, "pagerduty_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my PagerDuty integration"), +// Description: pulumi.String("example PagerDuty integration"), +// Type: pulumi.String("pagerduty"), +// Config: pulumi.Map{ +// "key": pulumi.Any("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fastly.NewIntegration(ctx, "slack_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my Slack integration"), +// Description: pulumi.String("example Slack integration"), +// Type: pulumi.String("slack"), +// Config: pulumi.Map{ +// "webhook": pulumi.Any("https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = fastly.NewIntegration(ctx, "webhook_example", &fastly.IntegrationArgs{ +// Name: pulumi.String("my webhook integration"), +// Description: pulumi.String("example webhook integration"), +// Type: pulumi.String("webhook"), +// Config: pulumi.Map{ +// "webhook": pulumi.Any("https://my.domain.com/webhook"), +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +type Integration struct { + pulumi.CustomResourceState + + // Configuration specific to the integration `type` (see documentation examples). + Config pulumi.MapOutput `pulumi:"config"` + // User submitted description of the integration. + Description pulumi.StringPtrOutput `pulumi:"description"` + // User submitted name of the integration. + Name pulumi.StringOutput `pulumi:"name"` + // Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + Type pulumi.StringOutput `pulumi:"type"` +} + +// NewIntegration registers a new resource with the given unique name, arguments, and options. +func NewIntegration(ctx *pulumi.Context, + name string, args *IntegrationArgs, opts ...pulumi.ResourceOption) (*Integration, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Config == nil { + return nil, errors.New("invalid value for required argument 'Config'") + } + if args.Type == nil { + return nil, errors.New("invalid value for required argument 'Type'") + } + if args.Config != nil { + args.Config = pulumi.ToSecret(args.Config).(pulumi.MapInput) + } + secrets := pulumi.AdditionalSecretOutputs([]string{ + "config", + }) + opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) + var resource Integration + err := ctx.RegisterResource("fastly:index/integration:Integration", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetIntegration gets an existing Integration 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 GetIntegration(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *IntegrationState, opts ...pulumi.ResourceOption) (*Integration, error) { + var resource Integration + err := ctx.ReadResource("fastly:index/integration:Integration", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Integration resources. +type integrationState struct { + // Configuration specific to the integration `type` (see documentation examples). + Config map[string]interface{} `pulumi:"config"` + // User submitted description of the integration. + Description *string `pulumi:"description"` + // User submitted name of the integration. + Name *string `pulumi:"name"` + // Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + Type *string `pulumi:"type"` +} + +type IntegrationState struct { + // Configuration specific to the integration `type` (see documentation examples). + Config pulumi.MapInput + // User submitted description of the integration. + Description pulumi.StringPtrInput + // User submitted name of the integration. + Name pulumi.StringPtrInput + // Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + Type pulumi.StringPtrInput +} + +func (IntegrationState) ElementType() reflect.Type { + return reflect.TypeOf((*integrationState)(nil)).Elem() +} + +type integrationArgs struct { + // Configuration specific to the integration `type` (see documentation examples). + Config map[string]interface{} `pulumi:"config"` + // User submitted description of the integration. + Description *string `pulumi:"description"` + // User submitted name of the integration. + Name *string `pulumi:"name"` + // Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + Type string `pulumi:"type"` +} + +// The set of arguments for constructing a Integration resource. +type IntegrationArgs struct { + // Configuration specific to the integration `type` (see documentation examples). + Config pulumi.MapInput + // User submitted description of the integration. + Description pulumi.StringPtrInput + // User submitted name of the integration. + Name pulumi.StringPtrInput + // Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + Type pulumi.StringInput +} + +func (IntegrationArgs) ElementType() reflect.Type { + return reflect.TypeOf((*integrationArgs)(nil)).Elem() +} + +type IntegrationInput interface { + pulumi.Input + + ToIntegrationOutput() IntegrationOutput + ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput +} + +func (*Integration) ElementType() reflect.Type { + return reflect.TypeOf((**Integration)(nil)).Elem() +} + +func (i *Integration) ToIntegrationOutput() IntegrationOutput { + return i.ToIntegrationOutputWithContext(context.Background()) +} + +func (i *Integration) ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput { + return pulumi.ToOutputWithContext(ctx, i).(IntegrationOutput) +} + +// IntegrationArrayInput is an input type that accepts IntegrationArray and IntegrationArrayOutput values. +// You can construct a concrete instance of `IntegrationArrayInput` via: +// +// IntegrationArray{ IntegrationArgs{...} } +type IntegrationArrayInput interface { + pulumi.Input + + ToIntegrationArrayOutput() IntegrationArrayOutput + ToIntegrationArrayOutputWithContext(context.Context) IntegrationArrayOutput +} + +type IntegrationArray []IntegrationInput + +func (IntegrationArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Integration)(nil)).Elem() +} + +func (i IntegrationArray) ToIntegrationArrayOutput() IntegrationArrayOutput { + return i.ToIntegrationArrayOutputWithContext(context.Background()) +} + +func (i IntegrationArray) ToIntegrationArrayOutputWithContext(ctx context.Context) IntegrationArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(IntegrationArrayOutput) +} + +// IntegrationMapInput is an input type that accepts IntegrationMap and IntegrationMapOutput values. +// You can construct a concrete instance of `IntegrationMapInput` via: +// +// IntegrationMap{ "key": IntegrationArgs{...} } +type IntegrationMapInput interface { + pulumi.Input + + ToIntegrationMapOutput() IntegrationMapOutput + ToIntegrationMapOutputWithContext(context.Context) IntegrationMapOutput +} + +type IntegrationMap map[string]IntegrationInput + +func (IntegrationMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Integration)(nil)).Elem() +} + +func (i IntegrationMap) ToIntegrationMapOutput() IntegrationMapOutput { + return i.ToIntegrationMapOutputWithContext(context.Background()) +} + +func (i IntegrationMap) ToIntegrationMapOutputWithContext(ctx context.Context) IntegrationMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(IntegrationMapOutput) +} + +type IntegrationOutput struct{ *pulumi.OutputState } + +func (IntegrationOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Integration)(nil)).Elem() +} + +func (o IntegrationOutput) ToIntegrationOutput() IntegrationOutput { + return o +} + +func (o IntegrationOutput) ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput { + return o +} + +// Configuration specific to the integration `type` (see documentation examples). +func (o IntegrationOutput) Config() pulumi.MapOutput { + return o.ApplyT(func(v *Integration) pulumi.MapOutput { return v.Config }).(pulumi.MapOutput) +} + +// User submitted description of the integration. +func (o IntegrationOutput) Description() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Integration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) +} + +// User submitted name of the integration. +func (o IntegrationOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. +func (o IntegrationOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) +} + +type IntegrationArrayOutput struct{ *pulumi.OutputState } + +func (IntegrationArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*Integration)(nil)).Elem() +} + +func (o IntegrationArrayOutput) ToIntegrationArrayOutput() IntegrationArrayOutput { + return o +} + +func (o IntegrationArrayOutput) ToIntegrationArrayOutputWithContext(ctx context.Context) IntegrationArrayOutput { + return o +} + +func (o IntegrationArrayOutput) Index(i pulumi.IntInput) IntegrationOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Integration { + return vs[0].([]*Integration)[vs[1].(int)] + }).(IntegrationOutput) +} + +type IntegrationMapOutput struct{ *pulumi.OutputState } + +func (IntegrationMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*Integration)(nil)).Elem() +} + +func (o IntegrationMapOutput) ToIntegrationMapOutput() IntegrationMapOutput { + return o +} + +func (o IntegrationMapOutput) ToIntegrationMapOutputWithContext(ctx context.Context) IntegrationMapOutput { + return o +} + +func (o IntegrationMapOutput) MapIndex(k pulumi.StringInput) IntegrationOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Integration { + return vs[0].(map[string]*Integration)[vs[1].(string)] + }).(IntegrationOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*IntegrationInput)(nil)).Elem(), &Integration{}) + pulumi.RegisterInputType(reflect.TypeOf((*IntegrationArrayInput)(nil)).Elem(), IntegrationArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*IntegrationMapInput)(nil)).Elem(), IntegrationMap{}) + pulumi.RegisterOutputType(IntegrationOutput{}) + pulumi.RegisterOutputType(IntegrationArrayOutput{}) + pulumi.RegisterOutputType(IntegrationMapOutput{}) +} diff --git a/sdk/go/fastly/pulumiTypes.go b/sdk/go/fastly/pulumiTypes.go index 2cc9c161..12805445 100644 --- a/sdk/go/fastly/pulumiTypes.go +++ b/sdk/go/fastly/pulumiTypes.go @@ -170,11 +170,13 @@ func (o AlertDimensionsPtrOutput) Origins() pulumi.StringArrayOutput { } type AlertEvaluationStrategy struct { - // The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + // Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + IgnoreBelow *float64 `pulumi:"ignoreBelow"` + // The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. Period string `pulumi:"period"` // Threshold used to alert. Threshold float64 `pulumi:"threshold"` - // Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. + // Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. Type string `pulumi:"type"` } @@ -190,11 +192,13 @@ type AlertEvaluationStrategyInput interface { } type AlertEvaluationStrategyArgs struct { - // The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + // Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + IgnoreBelow pulumi.Float64PtrInput `pulumi:"ignoreBelow"` + // The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. Period pulumi.StringInput `pulumi:"period"` // Threshold used to alert. Threshold pulumi.Float64Input `pulumi:"threshold"` - // Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. + // Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. Type pulumi.StringInput `pulumi:"type"` } @@ -275,7 +279,12 @@ func (o AlertEvaluationStrategyOutput) ToAlertEvaluationStrategyPtrOutputWithCon }).(AlertEvaluationStrategyPtrOutput) } -// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. +// Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. +func (o AlertEvaluationStrategyOutput) IgnoreBelow() pulumi.Float64PtrOutput { + return o.ApplyT(func(v AlertEvaluationStrategy) *float64 { return v.IgnoreBelow }).(pulumi.Float64PtrOutput) +} + +// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. func (o AlertEvaluationStrategyOutput) Period() pulumi.StringOutput { return o.ApplyT(func(v AlertEvaluationStrategy) string { return v.Period }).(pulumi.StringOutput) } @@ -285,7 +294,7 @@ func (o AlertEvaluationStrategyOutput) Threshold() pulumi.Float64Output { return o.ApplyT(func(v AlertEvaluationStrategy) float64 { return v.Threshold }).(pulumi.Float64Output) } -// Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. +// Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. func (o AlertEvaluationStrategyOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v AlertEvaluationStrategy) string { return v.Type }).(pulumi.StringOutput) } @@ -314,7 +323,17 @@ func (o AlertEvaluationStrategyPtrOutput) Elem() AlertEvaluationStrategyOutput { }).(AlertEvaluationStrategyOutput) } -// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. +// Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. +func (o AlertEvaluationStrategyPtrOutput) IgnoreBelow() pulumi.Float64PtrOutput { + return o.ApplyT(func(v *AlertEvaluationStrategy) *float64 { + if v == nil { + return nil + } + return v.IgnoreBelow + }).(pulumi.Float64PtrOutput) +} + +// The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. func (o AlertEvaluationStrategyPtrOutput) Period() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertEvaluationStrategy) *string { if v == nil { @@ -334,7 +353,7 @@ func (o AlertEvaluationStrategyPtrOutput) Threshold() pulumi.Float64PtrOutput { }).(pulumi.Float64PtrOutput) } -// Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. +// Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. func (o AlertEvaluationStrategyPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertEvaluationStrategy) *string { if v == nil { diff --git a/sdk/java/src/main/java/com/pulumi/fastly/Alert.java b/sdk/java/src/main/java/com/pulumi/fastly/Alert.java index fd9ac3e4..a25e80d0 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/Alert.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/Alert.java @@ -32,6 +32,8 @@ * import com.pulumi.core.Output; * import com.pulumi.fastly.ServiceVcl; * import com.pulumi.fastly.ServiceVclArgs; + * import com.pulumi.fastly.Integration; + * import com.pulumi.fastly.IntegrationArgs; * import com.pulumi.fastly.Alert; * import com.pulumi.fastly.AlertArgs; * import com.pulumi.fastly.inputs.AlertEvaluationStrategyArgs; @@ -52,6 +54,10 @@ * .name("my_vcl_service") * .build()); * + * var exampleIntegration = new Integration("exampleIntegration", IntegrationArgs.builder() + * .name("my_integration") + * .build()); + * * var exampleAlert = new Alert("exampleAlert", AlertArgs.builder() * .name("my_vcl_service errors") * .serviceId(example.id()) @@ -62,6 +68,7 @@ * .period("5m") * .threshold(10) * .build()) + * .integrationIds(exampleIntegration.id()) * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/fastly/FastlyFunctions.java b/sdk/java/src/main/java/com/pulumi/fastly/FastlyFunctions.java index 8c8963cf..40cee1d3 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/FastlyFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/FastlyFunctions.java @@ -4189,15 +4189,239 @@ public static Output getTlsSubscriptionIds(InvokeAr public static CompletableFuture getTlsSubscriptionIdsPlain(InvokeArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("fastly:index/getTlsSubscriptionIds:getTlsSubscriptionIds", TypeShape.of(GetTlsSubscriptionIdsResult.class), args, Utilities.withVersion(options)); } + /** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.fastly.ServiceVcl;
+     * import com.pulumi.fastly.ServiceVclArgs;
+     * import com.pulumi.fastly.inputs.ServiceVclDomainArgs;
+     * import com.pulumi.fastly.FastlyFunctions;
+     * import com.pulumi.fastly.inputs.GetVclSnippetsArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         var exampleServiceVcl = new ServiceVcl("exampleServiceVcl", ServiceVclArgs.builder()        
+     *             .name("Example Service")
+     *             .domains(ServiceVclDomainArgs.builder()
+     *                 .name("example.com")
+     *                 .build())
+     *             .forceDestroy(true)
+     *             .build());
+     * 
+     *         final var example = FastlyFunctions.getVclSnippets(GetVclSnippetsArgs.builder()
+     *             .serviceId(exampleServiceVcl.id())
+     *             .serviceVersion(exampleServiceVcl.activeVersion())
+     *             .build());
+     * 
+     *         ctx.export("serviceVclSnippets", example.applyValue(getVclSnippetsResult -> getVclSnippetsResult));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + * + */ public static Output getVclSnippets(GetVclSnippetsArgs args) { return getVclSnippets(args, InvokeOptions.Empty); } + /** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.fastly.ServiceVcl;
+     * import com.pulumi.fastly.ServiceVclArgs;
+     * import com.pulumi.fastly.inputs.ServiceVclDomainArgs;
+     * import com.pulumi.fastly.FastlyFunctions;
+     * import com.pulumi.fastly.inputs.GetVclSnippetsArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         var exampleServiceVcl = new ServiceVcl("exampleServiceVcl", ServiceVclArgs.builder()        
+     *             .name("Example Service")
+     *             .domains(ServiceVclDomainArgs.builder()
+     *                 .name("example.com")
+     *                 .build())
+     *             .forceDestroy(true)
+     *             .build());
+     * 
+     *         final var example = FastlyFunctions.getVclSnippets(GetVclSnippetsArgs.builder()
+     *             .serviceId(exampleServiceVcl.id())
+     *             .serviceVersion(exampleServiceVcl.activeVersion())
+     *             .build());
+     * 
+     *         ctx.export("serviceVclSnippets", example.applyValue(getVclSnippetsResult -> getVclSnippetsResult));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + * + */ public static CompletableFuture getVclSnippetsPlain(GetVclSnippetsPlainArgs args) { return getVclSnippetsPlain(args, InvokeOptions.Empty); } + /** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.fastly.ServiceVcl;
+     * import com.pulumi.fastly.ServiceVclArgs;
+     * import com.pulumi.fastly.inputs.ServiceVclDomainArgs;
+     * import com.pulumi.fastly.FastlyFunctions;
+     * import com.pulumi.fastly.inputs.GetVclSnippetsArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         var exampleServiceVcl = new ServiceVcl("exampleServiceVcl", ServiceVclArgs.builder()        
+     *             .name("Example Service")
+     *             .domains(ServiceVclDomainArgs.builder()
+     *                 .name("example.com")
+     *                 .build())
+     *             .forceDestroy(true)
+     *             .build());
+     * 
+     *         final var example = FastlyFunctions.getVclSnippets(GetVclSnippetsArgs.builder()
+     *             .serviceId(exampleServiceVcl.id())
+     *             .serviceVersion(exampleServiceVcl.activeVersion())
+     *             .build());
+     * 
+     *         ctx.export("serviceVclSnippets", example.applyValue(getVclSnippetsResult -> getVclSnippetsResult));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + * + */ public static Output getVclSnippets(GetVclSnippetsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("fastly:index/getVclSnippets:getVclSnippets", TypeShape.of(GetVclSnippetsResult.class), args, Utilities.withVersion(options)); } + /** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.fastly.ServiceVcl;
+     * import com.pulumi.fastly.ServiceVclArgs;
+     * import com.pulumi.fastly.inputs.ServiceVclDomainArgs;
+     * import com.pulumi.fastly.FastlyFunctions;
+     * import com.pulumi.fastly.inputs.GetVclSnippetsArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         var exampleServiceVcl = new ServiceVcl("exampleServiceVcl", ServiceVclArgs.builder()        
+     *             .name("Example Service")
+     *             .domains(ServiceVclDomainArgs.builder()
+     *                 .name("example.com")
+     *                 .build())
+     *             .forceDestroy(true)
+     *             .build());
+     * 
+     *         final var example = FastlyFunctions.getVclSnippets(GetVclSnippetsArgs.builder()
+     *             .serviceId(exampleServiceVcl.id())
+     *             .serviceVersion(exampleServiceVcl.activeVersion())
+     *             .build());
+     * 
+     *         ctx.export("serviceVclSnippets", example.applyValue(getVclSnippetsResult -> getVclSnippetsResult));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + * + */ public static CompletableFuture getVclSnippetsPlain(GetVclSnippetsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("fastly:index/getVclSnippets:getVclSnippets", TypeShape.of(GetVclSnippetsResult.class), args, Utilities.withVersion(options)); } diff --git a/sdk/java/src/main/java/com/pulumi/fastly/Integration.java b/sdk/java/src/main/java/com/pulumi/fastly/Integration.java new file mode 100644 index 00000000..669e1ae6 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/fastly/Integration.java @@ -0,0 +1,208 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.fastly; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.fastly.IntegrationArgs; +import com.pulumi.fastly.Utilities; +import com.pulumi.fastly.inputs.IntegrationState; +import java.lang.Object; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.fastly.Integration;
+ * import com.pulumi.fastly.IntegrationArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var mailinglistExample = new Integration("mailinglistExample", IntegrationArgs.builder()        
+ *             .name("my mailing list integration")
+ *             .description("example mailing list integration")
+ *             .type("mailinglist")
+ *             .config(Map.of("address", "incoming-hook{@literal @}my.domain.com"))
+ *             .build());
+ * 
+ *         var microsoftteamsExample = new Integration("microsoftteamsExample", IntegrationArgs.builder()        
+ *             .name("my Microsoft Teams integration")
+ *             .description("example Microsoft Teams integration")
+ *             .type("microsoftteams")
+ *             .config(Map.of("webhook", "https://m365x012345.webhook.office.com"))
+ *             .build());
+ * 
+ *         var newrelicExample = new Integration("newrelicExample", IntegrationArgs.builder()        
+ *             .name("my New Relic integration")
+ *             .description("example New Relic integration")
+ *             .type("newrelic")
+ *             .config(Map.ofEntries(
+ *                 Map.entry("account", "XXXXXXX"),
+ *                 Map.entry("key", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
+ *             ))
+ *             .build());
+ * 
+ *         var pagerdutyExample = new Integration("pagerdutyExample", IntegrationArgs.builder()        
+ *             .name("my PagerDuty integration")
+ *             .description("example PagerDuty integration")
+ *             .type("pagerduty")
+ *             .config(Map.of("key", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+ *             .build());
+ * 
+ *         var slackExample = new Integration("slackExample", IntegrationArgs.builder()        
+ *             .name("my Slack integration")
+ *             .description("example Slack integration")
+ *             .type("slack")
+ *             .config(Map.of("webhook", "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"))
+ *             .build());
+ * 
+ *         var webhookExample = new Integration("webhookExample", IntegrationArgs.builder()        
+ *             .name("my webhook integration")
+ *             .description("example webhook integration")
+ *             .type("webhook")
+ *             .config(Map.of("webhook", "https://my.domain.com/webhook"))
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + */ +@ResourceType(type="fastly:index/integration:Integration") +public class Integration extends com.pulumi.resources.CustomResource { + /** + * Configuration specific to the integration `type` (see documentation examples). + * + */ + @Export(name="config", refs={Map.class,String.class,Object.class}, tree="[0,1,2]") + private Output> config; + + /** + * @return Configuration specific to the integration `type` (see documentation examples). + * + */ + public Output> config() { + return this.config; + } + /** + * User submitted description of the integration. + * + */ + @Export(name="description", refs={String.class}, tree="[0]") + private Output description; + + /** + * @return User submitted description of the integration. + * + */ + public Output> description() { + return Codegen.optional(this.description); + } + /** + * User submitted name of the integration. + * + */ + @Export(name="name", refs={String.class}, tree="[0]") + private Output name; + + /** + * @return User submitted name of the integration. + * + */ + public Output name() { + return this.name; + } + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + @Export(name="type", refs={String.class}, tree="[0]") + private Output type; + + /** + * @return Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + public Output type() { + return this.type; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public Integration(String name) { + this(name, IntegrationArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public Integration(String name, IntegrationArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public Integration(String name, IntegrationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("fastly:index/integration:Integration", name, args == null ? IntegrationArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private Integration(String name, Output id, @Nullable IntegrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("fastly:index/integration:Integration", name, state, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .additionalSecretOutputs(List.of( + "config" + )) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static Integration get(String name, Output id, @Nullable IntegrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new Integration(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/fastly/IntegrationArgs.java b/sdk/java/src/main/java/com/pulumi/fastly/IntegrationArgs.java new file mode 100644 index 00000000..3df4bed2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/fastly/IntegrationArgs.java @@ -0,0 +1,203 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.fastly; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Object; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IntegrationArgs extends com.pulumi.resources.ResourceArgs { + + public static final IntegrationArgs Empty = new IntegrationArgs(); + + /** + * Configuration specific to the integration `type` (see documentation examples). + * + */ + @Import(name="config", required=true) + private Output> config; + + /** + * @return Configuration specific to the integration `type` (see documentation examples). + * + */ + public Output> config() { + return this.config; + } + + /** + * User submitted description of the integration. + * + */ + @Import(name="description") + private @Nullable Output description; + + /** + * @return User submitted description of the integration. + * + */ + public Optional> description() { + return Optional.ofNullable(this.description); + } + + /** + * User submitted name of the integration. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return User submitted name of the integration. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + @Import(name="type", required=true) + private Output type; + + /** + * @return Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + public Output type() { + return this.type; + } + + private IntegrationArgs() {} + + private IntegrationArgs(IntegrationArgs $) { + this.config = $.config; + this.description = $.description; + this.name = $.name; + this.type = $.type; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IntegrationArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IntegrationArgs $; + + public Builder() { + $ = new IntegrationArgs(); + } + + public Builder(IntegrationArgs defaults) { + $ = new IntegrationArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param config Configuration specific to the integration `type` (see documentation examples). + * + * @return builder + * + */ + public Builder config(Output> config) { + $.config = config; + return this; + } + + /** + * @param config Configuration specific to the integration `type` (see documentation examples). + * + * @return builder + * + */ + public Builder config(Map config) { + return config(Output.of(config)); + } + + /** + * @param description User submitted description of the integration. + * + * @return builder + * + */ + public Builder description(@Nullable Output description) { + $.description = description; + return this; + } + + /** + * @param description User submitted description of the integration. + * + * @return builder + * + */ + public Builder description(String description) { + return description(Output.of(description)); + } + + /** + * @param name User submitted name of the integration. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name User submitted name of the integration. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param type Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + * @return builder + * + */ + public Builder type(Output type) { + $.type = type; + return this; + } + + /** + * @param type Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + * @return builder + * + */ + public Builder type(String type) { + return type(Output.of(type)); + } + + public IntegrationArgs build() { + if ($.config == null) { + throw new MissingRequiredPropertyException("IntegrationArgs", "config"); + } + if ($.type == null) { + throw new MissingRequiredPropertyException("IntegrationArgs", "type"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/fastly/inputs/AlertEvaluationStrategyArgs.java b/sdk/java/src/main/java/com/pulumi/fastly/inputs/AlertEvaluationStrategyArgs.java index 7186308d..ddc13b51 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/inputs/AlertEvaluationStrategyArgs.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/inputs/AlertEvaluationStrategyArgs.java @@ -9,6 +9,8 @@ import java.lang.Double; import java.lang.String; import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; public final class AlertEvaluationStrategyArgs extends com.pulumi.resources.ResourceArgs { @@ -16,14 +18,29 @@ public final class AlertEvaluationStrategyArgs extends com.pulumi.resources.Reso public static final AlertEvaluationStrategyArgs Empty = new AlertEvaluationStrategyArgs(); /** - * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + */ + @Import(name="ignoreBelow") + private @Nullable Output ignoreBelow; + + /** + * @return Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + */ + public Optional> ignoreBelow() { + return Optional.ofNullable(this.ignoreBelow); + } + + /** + * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * */ @Import(name="period", required=true) private Output period; /** - * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * */ public Output period() { @@ -46,14 +63,14 @@ public Output threshold() { } /** - * Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * */ @Import(name="type", required=true) private Output type; /** - * @return Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * @return Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * */ public Output type() { @@ -63,6 +80,7 @@ public Output type() { private AlertEvaluationStrategyArgs() {} private AlertEvaluationStrategyArgs(AlertEvaluationStrategyArgs $) { + this.ignoreBelow = $.ignoreBelow; this.period = $.period; this.threshold = $.threshold; this.type = $.type; @@ -87,7 +105,28 @@ public Builder(AlertEvaluationStrategyArgs defaults) { } /** - * @param period The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * @param ignoreBelow Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + * @return builder + * + */ + public Builder ignoreBelow(@Nullable Output ignoreBelow) { + $.ignoreBelow = ignoreBelow; + return this; + } + + /** + * @param ignoreBelow Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + * @return builder + * + */ + public Builder ignoreBelow(Double ignoreBelow) { + return ignoreBelow(Output.of(ignoreBelow)); + } + + /** + * @param period The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * * @return builder * @@ -98,7 +137,7 @@ public Builder period(Output period) { } /** - * @param period The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * @param period The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * * @return builder * @@ -129,7 +168,7 @@ public Builder threshold(Double threshold) { } /** - * @param type Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * @param type Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * * @return builder * @@ -140,7 +179,7 @@ public Builder type(Output type) { } /** - * @param type Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * @param type Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsArgs.java b/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsArgs.java index 975f24c2..7e1e1b71 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsArgs.java @@ -15,16 +15,32 @@ public final class GetVclSnippetsArgs extends com.pulumi.resources.InvokeArgs { public static final GetVclSnippetsArgs Empty = new GetVclSnippetsArgs(); + /** + * Alphanumeric string identifying the service. + * + */ @Import(name="serviceId", required=true) private Output serviceId; + /** + * @return Alphanumeric string identifying the service. + * + */ public Output serviceId() { return this.serviceId; } + /** + * Integer identifying a service version. + * + */ @Import(name="serviceVersion", required=true) private Output serviceVersion; + /** + * @return Integer identifying a service version. + * + */ public Output serviceVersion() { return this.serviceVersion; } @@ -54,20 +70,44 @@ public Builder(GetVclSnippetsArgs defaults) { $ = new GetVclSnippetsArgs(Objects.requireNonNull(defaults)); } + /** + * @param serviceId Alphanumeric string identifying the service. + * + * @return builder + * + */ public Builder serviceId(Output serviceId) { $.serviceId = serviceId; return this; } + /** + * @param serviceId Alphanumeric string identifying the service. + * + * @return builder + * + */ public Builder serviceId(String serviceId) { return serviceId(Output.of(serviceId)); } + /** + * @param serviceVersion Integer identifying a service version. + * + * @return builder + * + */ public Builder serviceVersion(Output serviceVersion) { $.serviceVersion = serviceVersion; return this; } + /** + * @param serviceVersion Integer identifying a service version. + * + * @return builder + * + */ public Builder serviceVersion(Integer serviceVersion) { return serviceVersion(Output.of(serviceVersion)); } diff --git a/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsPlainArgs.java b/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsPlainArgs.java index 698c178b..6e80b589 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/inputs/GetVclSnippetsPlainArgs.java @@ -14,16 +14,32 @@ public final class GetVclSnippetsPlainArgs extends com.pulumi.resources.InvokeAr public static final GetVclSnippetsPlainArgs Empty = new GetVclSnippetsPlainArgs(); + /** + * Alphanumeric string identifying the service. + * + */ @Import(name="serviceId", required=true) private String serviceId; + /** + * @return Alphanumeric string identifying the service. + * + */ public String serviceId() { return this.serviceId; } + /** + * Integer identifying a service version. + * + */ @Import(name="serviceVersion", required=true) private Integer serviceVersion; + /** + * @return Integer identifying a service version. + * + */ public Integer serviceVersion() { return this.serviceVersion; } @@ -53,11 +69,23 @@ public Builder(GetVclSnippetsPlainArgs defaults) { $ = new GetVclSnippetsPlainArgs(Objects.requireNonNull(defaults)); } + /** + * @param serviceId Alphanumeric string identifying the service. + * + * @return builder + * + */ public Builder serviceId(String serviceId) { $.serviceId = serviceId; return this; } + /** + * @param serviceVersion Integer identifying a service version. + * + * @return builder + * + */ public Builder serviceVersion(Integer serviceVersion) { $.serviceVersion = serviceVersion; return this; diff --git a/sdk/java/src/main/java/com/pulumi/fastly/inputs/IntegrationState.java b/sdk/java/src/main/java/com/pulumi/fastly/inputs/IntegrationState.java new file mode 100644 index 00000000..c5436775 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/fastly/inputs/IntegrationState.java @@ -0,0 +1,196 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.fastly.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Object; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IntegrationState extends com.pulumi.resources.ResourceArgs { + + public static final IntegrationState Empty = new IntegrationState(); + + /** + * Configuration specific to the integration `type` (see documentation examples). + * + */ + @Import(name="config") + private @Nullable Output> config; + + /** + * @return Configuration specific to the integration `type` (see documentation examples). + * + */ + public Optional>> config() { + return Optional.ofNullable(this.config); + } + + /** + * User submitted description of the integration. + * + */ + @Import(name="description") + private @Nullable Output description; + + /** + * @return User submitted description of the integration. + * + */ + public Optional> description() { + return Optional.ofNullable(this.description); + } + + /** + * User submitted name of the integration. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return User submitted name of the integration. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + @Import(name="type") + private @Nullable Output type; + + /** + * @return Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + */ + public Optional> type() { + return Optional.ofNullable(this.type); + } + + private IntegrationState() {} + + private IntegrationState(IntegrationState $) { + this.config = $.config; + this.description = $.description; + this.name = $.name; + this.type = $.type; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IntegrationState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IntegrationState $; + + public Builder() { + $ = new IntegrationState(); + } + + public Builder(IntegrationState defaults) { + $ = new IntegrationState(Objects.requireNonNull(defaults)); + } + + /** + * @param config Configuration specific to the integration `type` (see documentation examples). + * + * @return builder + * + */ + public Builder config(@Nullable Output> config) { + $.config = config; + return this; + } + + /** + * @param config Configuration specific to the integration `type` (see documentation examples). + * + * @return builder + * + */ + public Builder config(Map config) { + return config(Output.of(config)); + } + + /** + * @param description User submitted description of the integration. + * + * @return builder + * + */ + public Builder description(@Nullable Output description) { + $.description = description; + return this; + } + + /** + * @param description User submitted description of the integration. + * + * @return builder + * + */ + public Builder description(String description) { + return description(Output.of(description)); + } + + /** + * @param name User submitted name of the integration. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name User submitted name of the integration. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param type Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + * @return builder + * + */ + public Builder type(@Nullable Output type) { + $.type = type; + return this; + } + + /** + * @param type Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + * + * @return builder + * + */ + public Builder type(String type) { + return type(Output.of(type)); + } + + public IntegrationState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/fastly/outputs/AlertEvaluationStrategy.java b/sdk/java/src/main/java/com/pulumi/fastly/outputs/AlertEvaluationStrategy.java index c381df4a..483343cd 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/outputs/AlertEvaluationStrategy.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/outputs/AlertEvaluationStrategy.java @@ -8,11 +8,18 @@ import java.lang.Double; import java.lang.String; import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; @CustomType public final class AlertEvaluationStrategy { /** - * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * @return Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + */ + private @Nullable Double ignoreBelow; + /** + * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * */ private String period; @@ -22,14 +29,21 @@ public final class AlertEvaluationStrategy { */ private Double threshold; /** - * @return Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * @return Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * */ private String type; private AlertEvaluationStrategy() {} /** - * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * @return Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + * + */ + public Optional ignoreBelow() { + return Optional.ofNullable(this.ignoreBelow); + } + /** + * @return The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. * */ public String period() { @@ -43,7 +57,7 @@ public Double threshold() { return this.threshold; } /** - * @return Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + * @return Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. * */ public String type() { @@ -59,17 +73,25 @@ public static Builder builder(AlertEvaluationStrategy defaults) { } @CustomType.Builder public static final class Builder { + private @Nullable Double ignoreBelow; private String period; private Double threshold; private String type; public Builder() {} public Builder(AlertEvaluationStrategy defaults) { Objects.requireNonNull(defaults); + this.ignoreBelow = defaults.ignoreBelow; this.period = defaults.period; this.threshold = defaults.threshold; this.type = defaults.type; } + @CustomType.Setter + public Builder ignoreBelow(@Nullable Double ignoreBelow) { + + this.ignoreBelow = ignoreBelow; + return this; + } @CustomType.Setter public Builder period(String period) { if (period == null) { @@ -96,6 +118,7 @@ public Builder type(String type) { } public AlertEvaluationStrategy build() { final var _resultValue = new AlertEvaluationStrategy(); + _resultValue.ignoreBelow = ignoreBelow; _resultValue.period = period; _resultValue.threshold = threshold; _resultValue.type = type; diff --git a/sdk/java/src/main/java/com/pulumi/fastly/outputs/GetVclSnippetsResult.java b/sdk/java/src/main/java/com/pulumi/fastly/outputs/GetVclSnippetsResult.java index 37c9bb20..c7182ff9 100644 --- a/sdk/java/src/main/java/com/pulumi/fastly/outputs/GetVclSnippetsResult.java +++ b/sdk/java/src/main/java/com/pulumi/fastly/outputs/GetVclSnippetsResult.java @@ -18,8 +18,20 @@ public final class GetVclSnippetsResult { * */ private String id; + /** + * @return Alphanumeric string identifying the service. + * + */ private String serviceId; + /** + * @return Integer identifying a service version. + * + */ private Integer serviceVersion; + /** + * @return List of all VCL snippets for the version of the service. + * + */ private List vclSnippets; private GetVclSnippetsResult() {} @@ -30,12 +42,24 @@ private GetVclSnippetsResult() {} public String id() { return this.id; } + /** + * @return Alphanumeric string identifying the service. + * + */ public String serviceId() { return this.serviceId; } + /** + * @return Integer identifying a service version. + * + */ public Integer serviceVersion() { return this.serviceVersion; } + /** + * @return List of all VCL snippets for the version of the service. + * + */ public List vclSnippets() { return this.vclSnippets; } diff --git a/sdk/nodejs/alert.ts b/sdk/nodejs/alert.ts index 4f7f9b37..c4a3fc6b 100644 --- a/sdk/nodejs/alert.ts +++ b/sdk/nodejs/alert.ts @@ -16,6 +16,7 @@ import * as utilities from "./utilities"; * import * as fastly from "@pulumi/fastly"; * * const example = new fastly.ServiceVcl("example", {name: "my_vcl_service"}); + * const exampleIntegration = new fastly.Integration("example", {name: "my_integration"}); * const exampleAlert = new fastly.Alert("example", { * name: "my_vcl_service errors", * serviceId: example.id, @@ -26,6 +27,7 @@ import * as utilities from "./utilities"; * period: "5m", * threshold: 10, * }, + * integrationIds: [exampleIntegration.id], * }); * ``` * diff --git a/sdk/nodejs/getVclSnippets.ts b/sdk/nodejs/getVclSnippets.ts index b44ab3af..7dcc4836 100644 --- a/sdk/nodejs/getVclSnippets.ts +++ b/sdk/nodejs/getVclSnippets.ts @@ -6,6 +6,33 @@ import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; +/** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as fastly from "@pulumi/fastly"; + * + * const exampleServiceVcl = new fastly.ServiceVcl("example", { + * name: "Example Service", + * domains: [{ + * name: "example.com", + * }], + * forceDestroy: true, + * }); + * const example = fastly.getVclSnippetsOutput({ + * serviceId: exampleServiceVcl.id, + * serviceVersion: exampleServiceVcl.activeVersion, + * }); + * export const serviceVclSnippets = example; + * ``` + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + */ export function getVclSnippets(args: GetVclSnippetsArgs, opts?: pulumi.InvokeOptions): Promise { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); @@ -19,7 +46,13 @@ export function getVclSnippets(args: GetVclSnippetsArgs, opts?: pulumi.InvokeOpt * A collection of arguments for invoking getVclSnippets. */ export interface GetVclSnippetsArgs { + /** + * Alphanumeric string identifying the service. + */ serviceId: string; + /** + * Integer identifying a service version. + */ serviceVersion: number; } @@ -31,10 +64,46 @@ export interface GetVclSnippetsResult { * The provider-assigned unique ID for this managed resource. */ readonly id: string; + /** + * Alphanumeric string identifying the service. + */ readonly serviceId: string; + /** + * Integer identifying a service version. + */ readonly serviceVersion: number; + /** + * List of all VCL snippets for the version of the service. + */ readonly vclSnippets: outputs.GetVclSnippetsVclSnippet[]; } +/** + * VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + * + * Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as fastly from "@pulumi/fastly"; + * + * const exampleServiceVcl = new fastly.ServiceVcl("example", { + * name: "Example Service", + * domains: [{ + * name: "example.com", + * }], + * forceDestroy: true, + * }); + * const example = fastly.getVclSnippetsOutput({ + * serviceId: exampleServiceVcl.id, + * serviceVersion: exampleServiceVcl.activeVersion, + * }); + * export const serviceVclSnippets = example; + * ``` + * + * [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + */ export function getVclSnippetsOutput(args: GetVclSnippetsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getVclSnippets(a, opts)) } @@ -43,6 +112,12 @@ export function getVclSnippetsOutput(args: GetVclSnippetsOutputArgs, opts?: pulu * A collection of arguments for invoking getVclSnippets. */ export interface GetVclSnippetsOutputArgs { + /** + * Alphanumeric string identifying the service. + */ serviceId: pulumi.Input; + /** + * Integer identifying a service version. + */ serviceVersion: pulumi.Input; } diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 7dd542e9..e6566aa4 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -135,6 +135,11 @@ export const getWafRules: typeof import("./getWafRules").getWafRules = null as a export const getWafRulesOutput: typeof import("./getWafRules").getWafRulesOutput = null as any; utilities.lazyLoad(exports, ["getWafRules","getWafRulesOutput"], () => require("./getWafRules")); +export { IntegrationArgs, IntegrationState } from "./integration"; +export type Integration = import("./integration").Integration; +export const Integration: typeof import("./integration").Integration = null as any; +utilities.lazyLoad(exports, ["Integration"], () => require("./integration")); + export { KvstoreArgs, KvstoreState } from "./kvstore"; export type Kvstore = import("./kvstore").Kvstore; export const Kvstore: typeof import("./kvstore").Kvstore = null as any; @@ -245,6 +250,8 @@ const _module = { return new Configstore(name, undefined, { urn }) case "fastly:index/configstoreEntries:ConfigstoreEntries": return new ConfigstoreEntries(name, undefined, { urn }) + case "fastly:index/integration:Integration": + return new Integration(name, undefined, { urn }) case "fastly:index/kvstore:Kvstore": return new Kvstore(name, undefined, { urn }) case "fastly:index/secretstore:Secretstore": @@ -287,6 +294,7 @@ const _module = { pulumi.runtime.registerResourceModule("fastly", "index/alert", _module) pulumi.runtime.registerResourceModule("fastly", "index/configstore", _module) pulumi.runtime.registerResourceModule("fastly", "index/configstoreEntries", _module) +pulumi.runtime.registerResourceModule("fastly", "index/integration", _module) pulumi.runtime.registerResourceModule("fastly", "index/kvstore", _module) pulumi.runtime.registerResourceModule("fastly", "index/secretstore", _module) pulumi.runtime.registerResourceModule("fastly", "index/serviceACLEntries", _module) diff --git a/sdk/nodejs/integration.ts b/sdk/nodejs/integration.ts new file mode 100644 index 00000000..6fef01e5 --- /dev/null +++ b/sdk/nodejs/integration.ts @@ -0,0 +1,189 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as fastly from "@pulumi/fastly"; + * + * const mailinglistExample = new fastly.Integration("mailinglist_example", { + * name: "my mailing list integration", + * description: "example mailing list integration", + * type: "mailinglist", + * config: { + * address: "incoming-hook@my.domain.com", + * }, + * }); + * const microsoftteamsExample = new fastly.Integration("microsoftteams_example", { + * name: "my Microsoft Teams integration", + * description: "example Microsoft Teams integration", + * type: "microsoftteams", + * config: { + * webhook: "https://m365x012345.webhook.office.com", + * }, + * }); + * const newrelicExample = new fastly.Integration("newrelic_example", { + * name: "my New Relic integration", + * description: "example New Relic integration", + * type: "newrelic", + * config: { + * account: "XXXXXXX", + * key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + * }, + * }); + * const pagerdutyExample = new fastly.Integration("pagerduty_example", { + * name: "my PagerDuty integration", + * description: "example PagerDuty integration", + * type: "pagerduty", + * config: { + * key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + * }, + * }); + * const slackExample = new fastly.Integration("slack_example", { + * name: "my Slack integration", + * description: "example Slack integration", + * type: "slack", + * config: { + * webhook: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", + * }, + * }); + * const webhookExample = new fastly.Integration("webhook_example", { + * name: "my webhook integration", + * description: "example webhook integration", + * type: "webhook", + * config: { + * webhook: "https://my.domain.com/webhook", + * }, + * }); + * ``` + */ +export class Integration extends pulumi.CustomResource { + /** + * Get an existing Integration 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?: IntegrationState, opts?: pulumi.CustomResourceOptions): Integration { + return new Integration(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'fastly:index/integration:Integration'; + + /** + * Returns true if the given object is an instance of Integration. 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 Integration { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Integration.__pulumiType; + } + + /** + * Configuration specific to the integration `type` (see documentation examples). + */ + public readonly config!: pulumi.Output<{[key: string]: any}>; + /** + * User submitted description of the integration. + */ + public readonly description!: pulumi.Output; + /** + * User submitted name of the integration. + */ + public readonly name!: pulumi.Output; + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + */ + public readonly type!: pulumi.Output; + + /** + * Create a Integration 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: IntegrationArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: IntegrationArgs | IntegrationState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as IntegrationState | undefined; + resourceInputs["config"] = state ? state.config : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as IntegrationArgs | undefined; + if ((!args || args.config === undefined) && !opts.urn) { + throw new Error("Missing required property 'config'"); + } + if ((!args || args.type === undefined) && !opts.urn) { + throw new Error("Missing required property 'type'"); + } + resourceInputs["config"] = args?.config ? pulumi.secret(args.config) : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["type"] = args ? args.type : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + const secretOpts = { additionalSecretOutputs: ["config"] }; + opts = pulumi.mergeOptions(opts, secretOpts); + super(Integration.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering Integration resources. + */ +export interface IntegrationState { + /** + * Configuration specific to the integration `type` (see documentation examples). + */ + config?: pulumi.Input<{[key: string]: any}>; + /** + * User submitted description of the integration. + */ + description?: pulumi.Input; + /** + * User submitted name of the integration. + */ + name?: pulumi.Input; + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a Integration resource. + */ +export interface IntegrationArgs { + /** + * Configuration specific to the integration `type` (see documentation examples). + */ + config: pulumi.Input<{[key: string]: any}>; + /** + * User submitted description of the integration. + */ + description?: pulumi.Input; + /** + * User submitted name of the integration. + */ + name?: pulumi.Input; + /** + * Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + */ + type: pulumi.Input; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 02b78efc..4d38af98 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -42,6 +42,7 @@ "getVclSnippets.ts", "getWafRules.ts", "index.ts", + "integration.ts", "kvstore.ts", "provider.ts", "secretstore.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index a13e89fa..ddfb2920 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -18,7 +18,11 @@ export interface AlertDimensions { export interface AlertEvaluationStrategy { /** - * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + */ + ignoreBelow?: pulumi.Input; + /** + * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. */ period: pulumi.Input; /** @@ -26,7 +30,7 @@ export interface AlertEvaluationStrategy { */ threshold: pulumi.Input; /** - * Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. + * Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. */ type: pulumi.Input; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 920c062b..227a8f67 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -18,7 +18,11 @@ export interface AlertDimensions { export interface AlertEvaluationStrategy { /** - * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + * Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + */ + ignoreBelow?: number; + /** + * The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. */ period: string; /** @@ -26,7 +30,7 @@ export interface AlertEvaluationStrategy { */ threshold: number; /** - * Type of strategy to use to evaluate. One of: `aboveThreshold`, `belowThreshold`. + * Type of strategy to use to evaluate. One of: `aboveThreshold`, `allAboveThreshold`, `belowThreshold`, `percentAbsolute`, `percentDecrease`, `percentIncrease`. */ type: string; } diff --git a/sdk/python/pulumi_fastly/__init__.py b/sdk/python/pulumi_fastly/__init__.py index 0501c938..8b992b3b 100644 --- a/sdk/python/pulumi_fastly/__init__.py +++ b/sdk/python/pulumi_fastly/__init__.py @@ -31,6 +31,7 @@ from .get_tls_subscription_ids import * from .get_vcl_snippets import * from .get_waf_rules import * +from .integration import * from .kvstore import * from .provider import * from .secretstore import * @@ -86,6 +87,14 @@ "fastly:index/configstoreEntries:ConfigstoreEntries": "ConfigstoreEntries" } }, + { + "pkg": "fastly", + "mod": "index/integration", + "fqn": "pulumi_fastly", + "classes": { + "fastly:index/integration:Integration": "Integration" + } + }, { "pkg": "fastly", "mod": "index/kvstore", diff --git a/sdk/python/pulumi_fastly/_inputs.py b/sdk/python/pulumi_fastly/_inputs.py index d08dddea..172b7ecd 100644 --- a/sdk/python/pulumi_fastly/_inputs.py +++ b/sdk/python/pulumi_fastly/_inputs.py @@ -141,21 +141,25 @@ class AlertEvaluationStrategyArgs: def __init__(__self__, *, period: pulumi.Input[str], threshold: pulumi.Input[float], - type: pulumi.Input[str]): + type: pulumi.Input[str], + ignore_below: Optional[pulumi.Input[float]] = None): """ - :param pulumi.Input[str] period: The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + :param pulumi.Input[str] period: The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. :param pulumi.Input[float] threshold: Threshold used to alert. - :param pulumi.Input[str] type: Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + :param pulumi.Input[str] type: Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. + :param pulumi.Input[float] ignore_below: Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. """ pulumi.set(__self__, "period", period) pulumi.set(__self__, "threshold", threshold) pulumi.set(__self__, "type", type) + if ignore_below is not None: + pulumi.set(__self__, "ignore_below", ignore_below) @property @pulumi.getter def period(self) -> pulumi.Input[str]: """ - The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. """ return pulumi.get(self, "period") @@ -179,7 +183,7 @@ def threshold(self, value: pulumi.Input[float]): @pulumi.getter def type(self) -> pulumi.Input[str]: """ - Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. """ return pulumi.get(self, "type") @@ -187,6 +191,18 @@ def type(self) -> pulumi.Input[str]: def type(self, value: pulumi.Input[str]): pulumi.set(self, "type", value) + @property + @pulumi.getter(name="ignoreBelow") + def ignore_below(self) -> Optional[pulumi.Input[float]]: + """ + Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + """ + return pulumi.get(self, "ignore_below") + + @ignore_below.setter + def ignore_below(self, value: Optional[pulumi.Input[float]]): + pulumi.set(self, "ignore_below", value) + @pulumi.input_type class ServiceACLEntriesEntryArgs: diff --git a/sdk/python/pulumi_fastly/alert.py b/sdk/python/pulumi_fastly/alert.py index 8a070129..b90d9af6 100644 --- a/sdk/python/pulumi_fastly/alert.py +++ b/sdk/python/pulumi_fastly/alert.py @@ -305,6 +305,7 @@ def __init__(__self__, import pulumi_fastly as fastly example = fastly.ServiceVcl("example", name="my_vcl_service") + example_integration = fastly.Integration("example", name="my_integration") example_alert = fastly.Alert("example", name="my_vcl_service errors", service_id=example.id, @@ -314,7 +315,8 @@ def __init__(__self__, type="above_threshold", period="5m", threshold=10, - )) + ), + integration_ids=[example_integration.id]) ``` ## Import @@ -352,6 +354,7 @@ def __init__(__self__, import pulumi_fastly as fastly example = fastly.ServiceVcl("example", name="my_vcl_service") + example_integration = fastly.Integration("example", name="my_integration") example_alert = fastly.Alert("example", name="my_vcl_service errors", service_id=example.id, @@ -361,7 +364,8 @@ def __init__(__self__, type="above_threshold", period="5m", threshold=10, - )) + ), + integration_ids=[example_integration.id]) ``` ## Import diff --git a/sdk/python/pulumi_fastly/get_vcl_snippets.py b/sdk/python/pulumi_fastly/get_vcl_snippets.py index fbea0725..a7624643 100644 --- a/sdk/python/pulumi_fastly/get_vcl_snippets.py +++ b/sdk/python/pulumi_fastly/get_vcl_snippets.py @@ -47,16 +47,25 @@ def id(self) -> str: @property @pulumi.getter(name="serviceId") def service_id(self) -> str: + """ + Alphanumeric string identifying the service. + """ return pulumi.get(self, "service_id") @property @pulumi.getter(name="serviceVersion") def service_version(self) -> int: + """ + Integer identifying a service version. + """ return pulumi.get(self, "service_version") @property @pulumi.getter(name="vclSnippets") def vcl_snippets(self) -> Sequence['outputs.GetVclSnippetsVclSnippetResult']: + """ + List of all VCL snippets for the version of the service. + """ return pulumi.get(self, "vcl_snippets") @@ -76,7 +85,32 @@ def get_vcl_snippets(service_id: Optional[str] = None, service_version: Optional[int] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVclSnippetsResult: """ - Use this data source to access information about an existing resource. + VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + + Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + + ## Example Usage + + ```python + import pulumi + import pulumi_fastly as fastly + + example_service_vcl = fastly.ServiceVcl("example", + name="Example Service", + domains=[fastly.ServiceVclDomainArgs( + name="example.com", + )], + force_destroy=True) + example = fastly.get_vcl_snippets_output(service_id=example_service_vcl.id, + service_version=example_service_vcl.active_version) + pulumi.export("serviceVclSnippets", example) + ``` + + [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + + + :param str service_id: Alphanumeric string identifying the service. + :param int service_version: Integer identifying a service version. """ __args__ = dict() __args__['serviceId'] = service_id @@ -96,6 +130,31 @@ def get_vcl_snippets_output(service_id: Optional[pulumi.Input[str]] = None, service_version: Optional[pulumi.Input[int]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVclSnippetsResult]: """ - Use this data source to access information about an existing resource. + VCL Snippets are blocks of VCL logic inserted into your service's configuration that don't require custom VCL. + + Use this data source to get a list of [Fastly VCL Snippets](https://www.fastly.com/documentation/reference/api/vcl-services/snippet/) for the specified service/version. + + ## Example Usage + + ```python + import pulumi + import pulumi_fastly as fastly + + example_service_vcl = fastly.ServiceVcl("example", + name="Example Service", + domains=[fastly.ServiceVclDomainArgs( + name="example.com", + )], + force_destroy=True) + example = fastly.get_vcl_snippets_output(service_id=example_service_vcl.id, + service_version=example_service_vcl.active_version) + pulumi.export("serviceVclSnippets", example) + ``` + + [1]: https://www.fastly.com/documentation/reference/api/vcl-services/snippet/ + + + :param str service_id: Alphanumeric string identifying the service. + :param int service_version: Integer identifying a service version. """ ... diff --git a/sdk/python/pulumi_fastly/integration.py b/sdk/python/pulumi_fastly/integration.py new file mode 100644 index 00000000..60356c12 --- /dev/null +++ b/sdk/python/pulumi_fastly/integration.py @@ -0,0 +1,388 @@ +# 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 + +__all__ = ['IntegrationArgs', 'Integration'] + +@pulumi.input_type +class IntegrationArgs: + def __init__(__self__, *, + config: pulumi.Input[Mapping[str, Any]], + type: pulumi.Input[str], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a Integration resource. + :param pulumi.Input[Mapping[str, Any]] config: Configuration specific to the integration `type` (see documentation examples). + :param pulumi.Input[str] type: Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + :param pulumi.Input[str] description: User submitted description of the integration. + :param pulumi.Input[str] name: User submitted name of the integration. + """ + pulumi.set(__self__, "config", config) + pulumi.set(__self__, "type", type) + if description is not None: + pulumi.set(__self__, "description", description) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def config(self) -> pulumi.Input[Mapping[str, Any]]: + """ + Configuration specific to the integration `type` (see documentation examples). + """ + return pulumi.get(self, "config") + + @config.setter + def config(self, value: pulumi.Input[Mapping[str, Any]]): + pulumi.set(self, "config", value) + + @property + @pulumi.getter + def type(self) -> pulumi.Input[str]: + """ + Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: pulumi.Input[str]): + pulumi.set(self, "type", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + User submitted description of the integration. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + User submitted name of the integration. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _IntegrationState: + def __init__(__self__, *, + config: Optional[pulumi.Input[Mapping[str, Any]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering Integration resources. + :param pulumi.Input[Mapping[str, Any]] config: Configuration specific to the integration `type` (see documentation examples). + :param pulumi.Input[str] description: User submitted description of the integration. + :param pulumi.Input[str] name: User submitted name of the integration. + :param pulumi.Input[str] type: Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + if config is not None: + pulumi.set(__self__, "config", config) + if description is not None: + pulumi.set(__self__, "description", description) + if name is not None: + pulumi.set(__self__, "name", name) + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def config(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + """ + Configuration specific to the integration `type` (see documentation examples). + """ + return pulumi.get(self, "config") + + @config.setter + def config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + pulumi.set(self, "config", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + User submitted description of the integration. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + User submitted name of the integration. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter + def type(self) -> Optional[pulumi.Input[str]]: + """ + Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "type", value) + + +class Integration(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + config: Optional[pulumi.Input[Mapping[str, Any]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_fastly as fastly + + mailinglist_example = fastly.Integration("mailinglist_example", + name="my mailing list integration", + description="example mailing list integration", + type="mailinglist", + config={ + "address": "incoming-hook@my.domain.com", + }) + microsoftteams_example = fastly.Integration("microsoftteams_example", + name="my Microsoft Teams integration", + description="example Microsoft Teams integration", + type="microsoftteams", + config={ + "webhook": "https://m365x012345.webhook.office.com", + }) + newrelic_example = fastly.Integration("newrelic_example", + name="my New Relic integration", + description="example New Relic integration", + type="newrelic", + config={ + "account": "XXXXXXX", + "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + }) + pagerduty_example = fastly.Integration("pagerduty_example", + name="my PagerDuty integration", + description="example PagerDuty integration", + type="pagerduty", + config={ + "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + }) + slack_example = fastly.Integration("slack_example", + name="my Slack integration", + description="example Slack integration", + type="slack", + config={ + "webhook": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", + }) + webhook_example = fastly.Integration("webhook_example", + name="my webhook integration", + description="example webhook integration", + type="webhook", + config={ + "webhook": "https://my.domain.com/webhook", + }) + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Mapping[str, Any]] config: Configuration specific to the integration `type` (see documentation examples). + :param pulumi.Input[str] description: User submitted description of the integration. + :param pulumi.Input[str] name: User submitted name of the integration. + :param pulumi.Input[str] type: Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: IntegrationArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## Example Usage + + ```python + import pulumi + import pulumi_fastly as fastly + + mailinglist_example = fastly.Integration("mailinglist_example", + name="my mailing list integration", + description="example mailing list integration", + type="mailinglist", + config={ + "address": "incoming-hook@my.domain.com", + }) + microsoftteams_example = fastly.Integration("microsoftteams_example", + name="my Microsoft Teams integration", + description="example Microsoft Teams integration", + type="microsoftteams", + config={ + "webhook": "https://m365x012345.webhook.office.com", + }) + newrelic_example = fastly.Integration("newrelic_example", + name="my New Relic integration", + description="example New Relic integration", + type="newrelic", + config={ + "account": "XXXXXXX", + "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + }) + pagerduty_example = fastly.Integration("pagerduty_example", + name="my PagerDuty integration", + description="example PagerDuty integration", + type="pagerduty", + config={ + "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + }) + slack_example = fastly.Integration("slack_example", + name="my Slack integration", + description="example Slack integration", + type="slack", + config={ + "webhook": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", + }) + webhook_example = fastly.Integration("webhook_example", + name="my webhook integration", + description="example webhook integration", + type="webhook", + config={ + "webhook": "https://my.domain.com/webhook", + }) + ``` + + :param str resource_name: The name of the resource. + :param IntegrationArgs 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(IntegrationArgs, 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, + config: Optional[pulumi.Input[Mapping[str, Any]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: 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__ = IntegrationArgs.__new__(IntegrationArgs) + + if config is None and not opts.urn: + raise TypeError("Missing required property 'config'") + __props__.__dict__["config"] = None if config is None else pulumi.Output.secret(config) + __props__.__dict__["description"] = description + __props__.__dict__["name"] = name + if type is None and not opts.urn: + raise TypeError("Missing required property 'type'") + __props__.__dict__["type"] = type + secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["config"]) + opts = pulumi.ResourceOptions.merge(opts, secret_opts) + super(Integration, __self__).__init__( + 'fastly:index/integration:Integration', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + config: Optional[pulumi.Input[Mapping[str, Any]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None) -> 'Integration': + """ + Get an existing Integration 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[Mapping[str, Any]] config: Configuration specific to the integration `type` (see documentation examples). + :param pulumi.Input[str] description: User submitted description of the integration. + :param pulumi.Input[str] name: User submitted name of the integration. + :param pulumi.Input[str] type: Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _IntegrationState.__new__(_IntegrationState) + + __props__.__dict__["config"] = config + __props__.__dict__["description"] = description + __props__.__dict__["name"] = name + __props__.__dict__["type"] = type + return Integration(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def config(self) -> pulumi.Output[Mapping[str, Any]]: + """ + Configuration specific to the integration `type` (see documentation examples). + """ + return pulumi.get(self, "config") + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + User submitted description of the integration. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + User submitted name of the integration. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + Type of the integration. One of: `mailinglist`, `microsoftteams`, `newrelic`, `pagerduty`, `slack`, `webhook`. + """ + return pulumi.get(self, "type") + diff --git a/sdk/python/pulumi_fastly/outputs.py b/sdk/python/pulumi_fastly/outputs.py index 8b93206f..c8ca34d8 100644 --- a/sdk/python/pulumi_fastly/outputs.py +++ b/sdk/python/pulumi_fastly/outputs.py @@ -140,24 +140,45 @@ def origins(self) -> Optional[Sequence[str]]: @pulumi.output_type class AlertEvaluationStrategy(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ignoreBelow": + suggest = "ignore_below" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in AlertEvaluationStrategy. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + AlertEvaluationStrategy.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + AlertEvaluationStrategy.__key_warning(key) + return super().get(key, default) + def __init__(__self__, *, period: str, threshold: float, - type: str): + type: str, + ignore_below: Optional[float] = None): """ - :param str period: The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + :param str period: The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. :param float threshold: Threshold used to alert. - :param str type: Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + :param str type: Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. + :param float ignore_below: Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. """ pulumi.set(__self__, "period", period) pulumi.set(__self__, "threshold", threshold) pulumi.set(__self__, "type", type) + if ignore_below is not None: + pulumi.set(__self__, "ignore_below", ignore_below) @property @pulumi.getter def period(self) -> str: """ - The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `5m`, `15m`, `30m`. + The length of time to evaluate whether the conditions have been met. The data is polled every minute. One of: `2m`, `3m`, `5m`, `15m`, `30m`. """ return pulumi.get(self, "period") @@ -173,10 +194,18 @@ def threshold(self) -> float: @pulumi.getter def type(self) -> str: """ - Type of strategy to use to evaluate. One of: `above_threshold`, `below_threshold`. + Type of strategy to use to evaluate. One of: `above_threshold`, `all_above_threshold`, `below_threshold`, `percent_absolute`, `percent_decrease`, `percent_increase`. """ return pulumi.get(self, "type") + @property + @pulumi.getter(name="ignoreBelow") + def ignore_below(self) -> Optional[float]: + """ + Threshold for the denominator value used in evaluations that calculate a rate or ratio. Usually used to filter out noise. + """ + return pulumi.get(self, "ignore_below") + @pulumi.output_type class ServiceACLEntriesEntry(dict): diff --git a/upstream b/upstream index 8d830a8a..97e0bf75 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 8d830a8a0400d32ad47810c2403cd472464c0aa5 +Subproject commit 97e0bf753d6de33ab65dcf5730a2977468cd3e09