1. Packages
  2. Port
  3. API Docs
  4. Integration
Port v2.0.9 published on Monday, Jun 24, 2024 by port-labs

port.Integration

Explore with Pulumi AI

port logo
Port v2.0.9 published on Monday, Jun 24, 2024 by port-labs

    Docs about integration and be found here.

    import * as pulumi from "@pulumi/pulumi";
    import * as port from "@pulumi/port";
    
    const myCustomIntegration = new port.index.Port_integration("myCustomIntegration", {
        installationId: "my-custom-integration-id",
        title: "My Custom Integration",
        version: "1.33.7",
        config: JSON.stringify({
            createMissingRelatedEntitiesboolean: true,
            deleteDependentEntities: true,
            resources: [{
                kind: "my-custom-kind",
                selector: {
                    query: ".title",
                },
                port: {
                    entity: {
                        mappings: [{
                            identifier: "'my-identifier'",
                            title: ".title",
                            blueprint: "'my-blueprint'",
                            properties: {
                                my_property: 123,
                            },
                            relations: {},
                        }],
                    },
                },
            }],
        }),
    });
    
    import pulumi
    import json
    import pulumi_port as port
    
    my_custom_integration = port.index.Port_integration("myCustomIntegration",
        installation_id=my-custom-integration-id,
        title=My Custom Integration,
        version=1.33.7,
        config=json.dumps({
            createMissingRelatedEntitiesboolean: True,
            deleteDependentEntities: True,
            resources: [{
                kind: my-custom-kind,
                selector: {
                    query: .title,
                },
                port: {
                    entity: {
                        mappings: [{
                            identifier: 'my-identifier',
                            title: .title,
                            blueprint: 'my-blueprint',
                            properties: {
                                my_property: 123,
                            },
                            relations: {},
                        }],
                    },
                },
            }],
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/port-labs/pulumi-port/sdk/v2/go/port"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := port.NewPort_integration(ctx, "myCustomIntegration", &port.Port_integrationArgs{
    InstallationId: "my-custom-integration-id",
    Title: "My Custom Integration",
    Version: "1.33.7",
    Config: %!v(PANIC=Format method: fatal: An assertion has failed: unlowered function toJSON),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Port = Pulumi.Port;
    
    return await Deployment.RunAsync(() => 
    {
        var myCustomIntegration = new Port.Index.Port_integration("myCustomIntegration", new()
        {
            InstallationId = "my-custom-integration-id",
            Title = "My Custom Integration",
            Version = "1.33.7",
            Config = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["createMissingRelatedEntitiesboolean"] = true,
                ["deleteDependentEntities"] = true,
                ["resources"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["kind"] = "my-custom-kind",
                        ["selector"] = new Dictionary<string, object?>
                        {
                            ["query"] = ".title",
                        },
                        ["port"] = new Dictionary<string, object?>
                        {
                            ["entity"] = new Dictionary<string, object?>
                            {
                                ["mappings"] = new[]
                                {
                                    new Dictionary<string, object?>
                                    {
                                        ["identifier"] = "'my-identifier'",
                                        ["title"] = ".title",
                                        ["blueprint"] = "'my-blueprint'",
                                        ["properties"] = new Dictionary<string, object?>
                                        {
                                            ["my_property"] = 123,
                                        },
                                        ["relations"] = new Dictionary<string, object?>
                                        {
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.port.port_integration;
    import com.pulumi.port.Port_integrationArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 myCustomIntegration = new Port_integration("myCustomIntegration", Port_integrationArgs.builder()
                .installationId("my-custom-integration-id")
                .title("My Custom Integration")
                .version("1.33.7")
                .config(serializeJson(
                    jsonObject(
                        jsonProperty("createMissingRelatedEntitiesboolean", true),
                        jsonProperty("deleteDependentEntities", true),
                        jsonProperty("resources", jsonArray(jsonObject(
                            jsonProperty("kind", "my-custom-kind"),
                            jsonProperty("selector", jsonObject(
                                jsonProperty("query", ".title")
                            )),
                            jsonProperty("port", jsonObject(
                                jsonProperty("entity", jsonObject(
                                    jsonProperty("mappings", jsonArray(jsonObject(
                                        jsonProperty("identifier", "'my-identifier'"),
                                        jsonProperty("title", ".title"),
                                        jsonProperty("blueprint", "'my-blueprint'"),
                                        jsonProperty("properties", jsonObject(
                                            jsonProperty("my_property", 123)
                                        )),
                                        jsonProperty("relations", jsonObject(
    
                                        ))
                                    )))
                                ))
                            ))
                        )))
                    )))
                .build());
    
        }
    }
    
    resources:
      myCustomIntegration:
        type: port:port_integration
        properties:
          installationId: my-custom-integration-id
          title: My Custom Integration
          version: 1.33.7
          config:
            fn::toJSON:
              createMissingRelatedEntitiesboolean: true
              deleteDependentEntities: true
              resources:
                - kind: my-custom-kind
                  selector:
                    query: .title
                  port:
                    entity:
                      mappings:
                        - identifier: '''my-identifier'''
                          title: .title
                          blueprint: '''my-blueprint'''
                          properties:
                            my_property: 123
                          relations: {}
    

    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,
                    installation_id: Optional[str] = None,
                    config: Optional[str] = None,
                    installation_app_type: Optional[str] = None,
                    kafka_changelog_destination: Optional[IntegrationKafkaChangelogDestinationArgs] = None,
                    title: Optional[str] = None,
                    version: Optional[str] = None,
                    webhook_changelog_destination: Optional[IntegrationWebhookChangelogDestinationArgs] = 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: port: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.

    Constructor example

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

    var integrationResource = new Port.Integration("integrationResource", new()
    {
        InstallationId = "string",
        Config = "string",
        InstallationAppType = "string",
        KafkaChangelogDestination = null,
        Title = "string",
        Version = "string",
        WebhookChangelogDestination = new Port.Inputs.IntegrationWebhookChangelogDestinationArgs
        {
            Url = "string",
            Agent = false,
        },
    });
    
    example, err := port.NewIntegration(ctx, "integrationResource", &port.IntegrationArgs{
    	InstallationId:            pulumi.String("string"),
    	Config:                    pulumi.String("string"),
    	InstallationAppType:       pulumi.String("string"),
    	KafkaChangelogDestination: nil,
    	Title:                     pulumi.String("string"),
    	Version:                   pulumi.String("string"),
    	WebhookChangelogDestination: &port.IntegrationWebhookChangelogDestinationArgs{
    		Url:   pulumi.String("string"),
    		Agent: pulumi.Bool(false),
    	},
    })
    
    var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
        .installationId("string")
        .config("string")
        .installationAppType("string")
        .kafkaChangelogDestination()
        .title("string")
        .version("string")
        .webhookChangelogDestination(IntegrationWebhookChangelogDestinationArgs.builder()
            .url("string")
            .agent(false)
            .build())
        .build());
    
    integration_resource = port.Integration("integrationResource",
        installation_id="string",
        config="string",
        installation_app_type="string",
        kafka_changelog_destination=port.IntegrationKafkaChangelogDestinationArgs(),
        title="string",
        version="string",
        webhook_changelog_destination=port.IntegrationWebhookChangelogDestinationArgs(
            url="string",
            agent=False,
        ))
    
    const integrationResource = new port.Integration("integrationResource", {
        installationId: "string",
        config: "string",
        installationAppType: "string",
        kafkaChangelogDestination: {},
        title: "string",
        version: "string",
        webhookChangelogDestination: {
            url: "string",
            agent: false,
        },
    });
    
    type: port:Integration
    properties:
        config: string
        installationAppType: string
        installationId: string
        kafkaChangelogDestination: {}
        title: string
        version: string
        webhookChangelogDestination:
            agent: false
            url: 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:

    InstallationId string
    Config string
    Integration Config Raw JSON string (use jsonencode)
    InstallationAppType string
    KafkaChangelogDestination port_labs.Port.Inputs.IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    Title string
    Version string
    WebhookChangelogDestination port_labs.Port.Inputs.IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    InstallationId string
    Config string
    Integration Config Raw JSON string (use jsonencode)
    InstallationAppType string
    KafkaChangelogDestination IntegrationKafkaChangelogDestinationArgs
    The changelog destination of the blueprint (just an empty {})
    Title string
    Version string
    WebhookChangelogDestination IntegrationWebhookChangelogDestinationArgs
    The webhook changelog destination of the integration
    installationId String
    config String
    Integration Config Raw JSON string (use jsonencode)
    installationAppType String
    kafkaChangelogDestination IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    title String
    version String
    webhookChangelogDestination IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    installationId string
    config string
    Integration Config Raw JSON string (use jsonencode)
    installationAppType string
    kafkaChangelogDestination IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    title string
    version string
    webhookChangelogDestination IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    installation_id str
    config str
    Integration Config Raw JSON string (use jsonencode)
    installation_app_type str
    kafka_changelog_destination IntegrationKafkaChangelogDestinationArgs
    The changelog destination of the blueprint (just an empty {})
    title str
    version str
    webhook_changelog_destination IntegrationWebhookChangelogDestinationArgs
    The webhook changelog destination of the integration
    installationId String
    config String
    Integration Config Raw JSON string (use jsonencode)
    installationAppType String
    kafkaChangelogDestination Property Map
    The changelog destination of the blueprint (just an empty {})
    title String
    version String
    webhookChangelogDestination Property Map
    The webhook changelog destination 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[str] = None,
            installation_app_type: Optional[str] = None,
            installation_id: Optional[str] = None,
            kafka_changelog_destination: Optional[IntegrationKafkaChangelogDestinationArgs] = None,
            title: Optional[str] = None,
            version: Optional[str] = None,
            webhook_changelog_destination: Optional[IntegrationWebhookChangelogDestinationArgs] = 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 string
    Integration Config Raw JSON string (use jsonencode)
    InstallationAppType string
    InstallationId string
    KafkaChangelogDestination port_labs.Port.Inputs.IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    Title string
    Version string
    WebhookChangelogDestination port_labs.Port.Inputs.IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    Config string
    Integration Config Raw JSON string (use jsonencode)
    InstallationAppType string
    InstallationId string
    KafkaChangelogDestination IntegrationKafkaChangelogDestinationArgs
    The changelog destination of the blueprint (just an empty {})
    Title string
    Version string
    WebhookChangelogDestination IntegrationWebhookChangelogDestinationArgs
    The webhook changelog destination of the integration
    config String
    Integration Config Raw JSON string (use jsonencode)
    installationAppType String
    installationId String
    kafkaChangelogDestination IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    title String
    version String
    webhookChangelogDestination IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    config string
    Integration Config Raw JSON string (use jsonencode)
    installationAppType string
    installationId string
    kafkaChangelogDestination IntegrationKafkaChangelogDestination
    The changelog destination of the blueprint (just an empty {})
    title string
    version string
    webhookChangelogDestination IntegrationWebhookChangelogDestination
    The webhook changelog destination of the integration
    config str
    Integration Config Raw JSON string (use jsonencode)
    installation_app_type str
    installation_id str
    kafka_changelog_destination IntegrationKafkaChangelogDestinationArgs
    The changelog destination of the blueprint (just an empty {})
    title str
    version str
    webhook_changelog_destination IntegrationWebhookChangelogDestinationArgs
    The webhook changelog destination of the integration
    config String
    Integration Config Raw JSON string (use jsonencode)
    installationAppType String
    installationId String
    kafkaChangelogDestination Property Map
    The changelog destination of the blueprint (just an empty {})
    title String
    version String
    webhookChangelogDestination Property Map
    The webhook changelog destination of the integration

    Supporting Types

    IntegrationWebhookChangelogDestination, IntegrationWebhookChangelogDestinationArgs

    Url string
    The url of the webhook changelog destination
    Agent bool
    The agent of the webhook changelog destination
    Url string
    The url of the webhook changelog destination
    Agent bool
    The agent of the webhook changelog destination
    url String
    The url of the webhook changelog destination
    agent Boolean
    The agent of the webhook changelog destination
    url string
    The url of the webhook changelog destination
    agent boolean
    The agent of the webhook changelog destination
    url str
    The url of the webhook changelog destination
    agent bool
    The agent of the webhook changelog destination
    url String
    The url of the webhook changelog destination
    agent Boolean
    The agent of the webhook changelog destination

    Package Details

    Repository
    port port-labs/pulumi-port
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the port-labs Terraform Provider.
    port logo
    Port v2.0.9 published on Monday, Jun 24, 2024 by port-labs