1. Packages
  2. Konnect Provider
  3. API Docs
  4. PortalSnippet
konnect 3.1.0 published on Tuesday, Sep 2, 2025 by kong

konnect.PortalSnippet

Explore with Pulumi AI

konnect logo
konnect 3.1.0 published on Tuesday, Sep 2, 2025 by kong

    PortalSnippet Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as konnect from "@pulumi/konnect";
    
    const myPortalsnippet = new konnect.PortalSnippet("myPortalsnippet", {
        content: "# Welcome to My Snippet",
        description: "A custom page about developer portals",
        portalId: "f32d905a-ed33-46a3-a093-d8f536af9a8a",
        status: "published",
        title: "My Snippet",
        visibility: "public",
    });
    
    import pulumi
    import pulumi_konnect as konnect
    
    my_portalsnippet = konnect.PortalSnippet("myPortalsnippet",
        content="# Welcome to My Snippet",
        description="A custom page about developer portals",
        portal_id="f32d905a-ed33-46a3-a093-d8f536af9a8a",
        status="published",
        title="My Snippet",
        visibility="public")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/konnect/v3/konnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := konnect.NewPortalSnippet(ctx, "myPortalsnippet", &konnect.PortalSnippetArgs{
    			Content:     pulumi.String("# Welcome to My Snippet"),
    			Description: pulumi.String("A custom page about developer portals"),
    			PortalId:    pulumi.String("f32d905a-ed33-46a3-a093-d8f536af9a8a"),
    			Status:      pulumi.String("published"),
    			Title:       pulumi.String("My Snippet"),
    			Visibility:  pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Konnect = Pulumi.Konnect;
    
    return await Deployment.RunAsync(() => 
    {
        var myPortalsnippet = new Konnect.PortalSnippet("myPortalsnippet", new()
        {
            Content = "# Welcome to My Snippet",
            Description = "A custom page about developer portals",
            PortalId = "f32d905a-ed33-46a3-a093-d8f536af9a8a",
            Status = "published",
            Title = "My Snippet",
            Visibility = "public",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.konnect.PortalSnippet;
    import com.pulumi.konnect.PortalSnippetArgs;
    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 myPortalsnippet = new PortalSnippet("myPortalsnippet", PortalSnippetArgs.builder()
                .content("# Welcome to My Snippet")
                .description("A custom page about developer portals")
                .portalId("f32d905a-ed33-46a3-a093-d8f536af9a8a")
                .status("published")
                .title("My Snippet")
                .visibility("public")
                .build());
    
        }
    }
    
    resources:
      myPortalsnippet:
        type: konnect:PortalSnippet
        properties:
          content: '# Welcome to My Snippet'
          description: A custom page about developer portals
          portalId: f32d905a-ed33-46a3-a093-d8f536af9a8a
          status: published
          title: My Snippet
          visibility: public
    

    Create PortalSnippet Resource

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

    Constructor syntax

    new PortalSnippet(name: string, args: PortalSnippetArgs, opts?: CustomResourceOptions);
    @overload
    def PortalSnippet(resource_name: str,
                      args: PortalSnippetArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def PortalSnippet(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      content: Optional[str] = None,
                      portal_id: Optional[str] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None,
                      status: Optional[str] = None,
                      title: Optional[str] = None,
                      visibility: Optional[str] = None)
    func NewPortalSnippet(ctx *Context, name string, args PortalSnippetArgs, opts ...ResourceOption) (*PortalSnippet, error)
    public PortalSnippet(string name, PortalSnippetArgs args, CustomResourceOptions? opts = null)
    public PortalSnippet(String name, PortalSnippetArgs args)
    public PortalSnippet(String name, PortalSnippetArgs args, CustomResourceOptions options)
    
    type: konnect:PortalSnippet
    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 PortalSnippetArgs
    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 PortalSnippetArgs
    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 PortalSnippetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PortalSnippetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PortalSnippetArgs
    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 portalSnippetResource = new Konnect.PortalSnippet("portalSnippetResource", new()
    {
        Content = "string",
        PortalId = "string",
        Description = "string",
        Name = "string",
        Status = "string",
        Title = "string",
        Visibility = "string",
    });
    
    example, err := konnect.NewPortalSnippet(ctx, "portalSnippetResource", &konnect.PortalSnippetArgs{
    	Content:     pulumi.String("string"),
    	PortalId:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Status:      pulumi.String("string"),
    	Title:       pulumi.String("string"),
    	Visibility:  pulumi.String("string"),
    })
    
    var portalSnippetResource = new PortalSnippet("portalSnippetResource", PortalSnippetArgs.builder()
        .content("string")
        .portalId("string")
        .description("string")
        .name("string")
        .status("string")
        .title("string")
        .visibility("string")
        .build());
    
    portal_snippet_resource = konnect.PortalSnippet("portalSnippetResource",
        content="string",
        portal_id="string",
        description="string",
        name="string",
        status="string",
        title="string",
        visibility="string")
    
    const portalSnippetResource = new konnect.PortalSnippet("portalSnippetResource", {
        content: "string",
        portalId: "string",
        description: "string",
        name: "string",
        status: "string",
        title: "string",
        visibility: "string",
    });
    
    type: konnect:PortalSnippet
    properties:
        content: string
        description: string
        name: string
        portalId: string
        status: string
        title: string
        visibility: string
    

    PortalSnippet Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PortalSnippet resource accepts the following input properties:

    Content string
    The renderable markdown content of a page in a portal.
    PortalId string
    The Portal identifier
    Description string
    Name string
    The unique name of a snippet in a portal.
    Status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    Title string
    The display title of a snippet in a portal.
    Visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    Content string
    The renderable markdown content of a page in a portal.
    PortalId string
    The Portal identifier
    Description string
    Name string
    The unique name of a snippet in a portal.
    Status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    Title string
    The display title of a snippet in a portal.
    Visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content String
    The renderable markdown content of a page in a portal.
    portalId String
    The Portal identifier
    description String
    name String
    The unique name of a snippet in a portal.
    status String
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title String
    The display title of a snippet in a portal.
    visibility String
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content string
    The renderable markdown content of a page in a portal.
    portalId string
    The Portal identifier
    description string
    name string
    The unique name of a snippet in a portal.
    status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title string
    The display title of a snippet in a portal.
    visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content str
    The renderable markdown content of a page in a portal.
    portal_id str
    The Portal identifier
    description str
    name str
    The unique name of a snippet in a portal.
    status str
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title str
    The display title of a snippet in a portal.
    visibility str
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content String
    The renderable markdown content of a page in a portal.
    portalId String
    The Portal identifier
    description String
    name String
    The unique name of a snippet in a portal.
    status String
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title String
    The display title of a snippet in a portal.
    visibility String
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]

    Outputs

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

    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.

    Look up Existing PortalSnippet Resource

    Get an existing PortalSnippet 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?: PortalSnippetState, opts?: CustomResourceOptions): PortalSnippet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            portal_id: Optional[str] = None,
            status: Optional[str] = None,
            title: Optional[str] = None,
            updated_at: Optional[str] = None,
            visibility: Optional[str] = None) -> PortalSnippet
    func GetPortalSnippet(ctx *Context, name string, id IDInput, state *PortalSnippetState, opts ...ResourceOption) (*PortalSnippet, error)
    public static PortalSnippet Get(string name, Input<string> id, PortalSnippetState? state, CustomResourceOptions? opts = null)
    public static PortalSnippet get(String name, Output<String> id, PortalSnippetState state, CustomResourceOptions options)
    resources:  _:    type: konnect:PortalSnippet    get:      id: ${id}
    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:
    Content string
    The renderable markdown content of a page in a portal.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Description string
    Name string
    The unique name of a snippet in a portal.
    PortalId string
    The Portal identifier
    Status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    Title string
    The display title of a snippet in a portal.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    Visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    Content string
    The renderable markdown content of a page in a portal.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Description string
    Name string
    The unique name of a snippet in a portal.
    PortalId string
    The Portal identifier
    Status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    Title string
    The display title of a snippet in a portal.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    Visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content String
    The renderable markdown content of a page in a portal.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    description String
    name String
    The unique name of a snippet in a portal.
    portalId String
    The Portal identifier
    status String
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title String
    The display title of a snippet in a portal.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    visibility String
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content string
    The renderable markdown content of a page in a portal.
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    description string
    name string
    The unique name of a snippet in a portal.
    portalId string
    The Portal identifier
    status string
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title string
    The display title of a snippet in a portal.
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    visibility string
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content str
    The renderable markdown content of a page in a portal.
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    description str
    name str
    The unique name of a snippet in a portal.
    portal_id str
    The Portal identifier
    status str
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title str
    The display title of a snippet in a portal.
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    visibility str
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]
    content String
    The renderable markdown content of a page in a portal.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    description String
    name String
    The unique name of a snippet in a portal.
    portalId String
    The Portal identifier
    status String
    Whether the resource is visible on a given portal. Defaults to unpublished. must be one of ["published", "unpublished"]
    title String
    The display title of a snippet in a portal.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    visibility String
    Whether a snippet is publicly accessible to non-authenticated users. If not provided, the defaultpagevisibility value of the portal will be used. must be one of ["public", "private"]

    Import

    $ pulumi import konnect:index/portalSnippet:PortalSnippet my_konnect_portal_snippet '{"id": "ebbac5b0-ac89-45c3-9d2e-c4542c657e79", "portal_id": "f32d905a-ed33-46a3-a093-d8f536af9a8a"}'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    konnect kong/terraform-provider-konnect
    License
    Notes
    This Pulumi package is based on the konnect Terraform Provider.
    konnect logo
    konnect 3.1.0 published on Tuesday, Sep 2, 2025 by kong