1. Packages
  2. Fastly
  3. API Docs
  4. Integration
Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi

fastly.Integration

Explore with Pulumi AI

fastly logo
Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi

    Example Usage

    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",
        },
    });
    
    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",
        })
    
    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
    	})
    }
    
    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" },
            },
        });
    
    });
    
    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@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());
    
        }
    }
    
    resources:
      mailinglistExample:
        type: fastly:Integration
        name: mailinglist_example
        properties:
          name: my mailing list integration
          description: example mailing list integration
          type: mailinglist
          config:
            address: incoming-hook@my.domain.com
      microsoftteamsExample:
        type: fastly:Integration
        name: microsoftteams_example
        properties:
          name: my Microsoft Teams integration
          description: example Microsoft Teams integration
          type: microsoftteams
          config:
            webhook: https://m365x012345.webhook.office.com
      newrelicExample:
        type: fastly:Integration
        name: newrelic_example
        properties:
          name: my New Relic integration
          description: example New Relic integration
          type: newrelic
          config:
            account: XXXXXXX
            key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      pagerdutyExample:
        type: fastly:Integration
        name: pagerduty_example
        properties:
          name: my PagerDuty integration
          description: example PagerDuty integration
          type: pagerduty
          config:
            key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      slackExample:
        type: fastly:Integration
        name: slack_example
        properties:
          name: my Slack integration
          description: example Slack integration
          type: slack
          config:
            webhook: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
      webhookExample:
        type: fastly:Integration
        name: webhook_example
        properties:
          name: my webhook integration
          description: example webhook integration
          type: webhook
          config:
            webhook: https://my.domain.com/webhook
    

    Create Integration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def Integration(resource_name: str,
                    args: IntegrationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Integration(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    config: Optional[Mapping[str, Any]] = None,
                    type: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None)
    func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
    public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
    public Integration(String name, IntegrationArgs args)
    public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
    
    type: fastly:Integration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var integrationResource = new Fastly.Integration("integrationResource", new()
    {
        Config = 
        {
            { "string", "any" },
        },
        Type = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := fastly.NewIntegration(ctx, "integrationResource", &fastly.IntegrationArgs{
    	Config: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
        .config(Map.of("string", "any"))
        .type("string")
        .description("string")
        .name("string")
        .build());
    
    integration_resource = fastly.Integration("integrationResource",
        config={
            "string": "any",
        },
        type="string",
        description="string",
        name="string")
    
    const integrationResource = new fastly.Integration("integrationResource", {
        config: {
            string: "any",
        },
        type: "string",
        description: "string",
        name: "string",
    });
    
    type: fastly:Integration
    properties:
        config:
            string: any
        description: string
        name: string
        type: string
    

    Integration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Integration resource accepts the following input properties:

    Config Dictionary<string, object>
    Configuration specific to the integration type (see documentation examples).
    Type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    Description string
    User submitted description of the integration.
    Name string
    User submitted name of the integration.
    Config map[string]interface{}
    Configuration specific to the integration type (see documentation examples).
    Type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    Description string
    User submitted description of the integration.
    Name string
    User submitted name of the integration.
    config Map<String,Object>
    Configuration specific to the integration type (see documentation examples).
    type String
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    description String
    User submitted description of the integration.
    name String
    User submitted name of the integration.
    config {[key: string]: any}
    Configuration specific to the integration type (see documentation examples).
    type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    description string
    User submitted description of the integration.
    name string
    User submitted name of the integration.
    config Mapping[str, Any]
    Configuration specific to the integration type (see documentation examples).
    type str
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    description str
    User submitted description of the integration.
    name str
    User submitted name of the integration.
    config Map<Any>
    Configuration specific to the integration type (see documentation examples).
    type String
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    description String
    User submitted description of the integration.
    name String
    User submitted name of the integration.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Integration resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Integration Resource

    Get an existing Integration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IntegrationState, opts?: CustomResourceOptions): Integration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            config: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None) -> Integration
    func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
    public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
    public static Integration get(String name, Output<String> id, IntegrationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Config Dictionary<string, object>
    Configuration specific to the integration type (see documentation examples).
    Description string
    User submitted description of the integration.
    Name string
    User submitted name of the integration.
    Type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    Config map[string]interface{}
    Configuration specific to the integration type (see documentation examples).
    Description string
    User submitted description of the integration.
    Name string
    User submitted name of the integration.
    Type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    config Map<String,Object>
    Configuration specific to the integration type (see documentation examples).
    description String
    User submitted description of the integration.
    name String
    User submitted name of the integration.
    type String
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    config {[key: string]: any}
    Configuration specific to the integration type (see documentation examples).
    description string
    User submitted description of the integration.
    name string
    User submitted name of the integration.
    type string
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    config Mapping[str, Any]
    Configuration specific to the integration type (see documentation examples).
    description str
    User submitted description of the integration.
    name str
    User submitted name of the integration.
    type str
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.
    config Map<Any>
    Configuration specific to the integration type (see documentation examples).
    description String
    User submitted description of the integration.
    name String
    User submitted name of the integration.
    type String
    Type of the integration. One of: mailinglist, microsoftteams, newrelic, pagerduty, slack, webhook.

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi