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

konnect.ApiDocument

Explore with Pulumi AI

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

    APIDocument Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as konnect from "@pulumi/konnect";
    
    const myApidocument = new konnect.ApiDocument("myApidocument", {
        apiId: "9f5061ce-78f6-4452-9108-ad7c02821fd5",
        content: "...my_content...",
        parentDocumentId: "b689d9da-f357-4687-8303-ec1c14d44e37",
        slug: "api-document",
        status: "published",
        title: "API Document",
    });
    
    import pulumi
    import pulumi_konnect as konnect
    
    my_apidocument = konnect.ApiDocument("myApidocument",
        api_id="9f5061ce-78f6-4452-9108-ad7c02821fd5",
        content="...my_content...",
        parent_document_id="b689d9da-f357-4687-8303-ec1c14d44e37",
        slug="api-document",
        status="published",
        title="API Document")
    
    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.NewApiDocument(ctx, "myApidocument", &konnect.ApiDocumentArgs{
    			ApiId:            pulumi.String("9f5061ce-78f6-4452-9108-ad7c02821fd5"),
    			Content:          pulumi.String("...my_content..."),
    			ParentDocumentId: pulumi.String("b689d9da-f357-4687-8303-ec1c14d44e37"),
    			Slug:             pulumi.String("api-document"),
    			Status:           pulumi.String("published"),
    			Title:            pulumi.String("API Document"),
    		})
    		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 myApidocument = new Konnect.ApiDocument("myApidocument", new()
        {
            ApiId = "9f5061ce-78f6-4452-9108-ad7c02821fd5",
            Content = "...my_content...",
            ParentDocumentId = "b689d9da-f357-4687-8303-ec1c14d44e37",
            Slug = "api-document",
            Status = "published",
            Title = "API Document",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.konnect.ApiDocument;
    import com.pulumi.konnect.ApiDocumentArgs;
    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 myApidocument = new ApiDocument("myApidocument", ApiDocumentArgs.builder()
                .apiId("9f5061ce-78f6-4452-9108-ad7c02821fd5")
                .content("...my_content...")
                .parentDocumentId("b689d9da-f357-4687-8303-ec1c14d44e37")
                .slug("api-document")
                .status("published")
                .title("API Document")
                .build());
    
        }
    }
    
    resources:
      myApidocument:
        type: konnect:ApiDocument
        properties:
          apiId: 9f5061ce-78f6-4452-9108-ad7c02821fd5
          content: '...my_content...'
          parentDocumentId: b689d9da-f357-4687-8303-ec1c14d44e37
          slug: api-document
          status: published
          title: API Document
    

    Create ApiDocument Resource

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

    Constructor syntax

    new ApiDocument(name: string, args: ApiDocumentArgs, opts?: CustomResourceOptions);
    @overload
    def ApiDocument(resource_name: str,
                    args: ApiDocumentArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiDocument(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    api_id: Optional[str] = None,
                    content: Optional[str] = None,
                    parent_document_id: Optional[str] = None,
                    slug: Optional[str] = None,
                    status: Optional[str] = None,
                    title: Optional[str] = None)
    func NewApiDocument(ctx *Context, name string, args ApiDocumentArgs, opts ...ResourceOption) (*ApiDocument, error)
    public ApiDocument(string name, ApiDocumentArgs args, CustomResourceOptions? opts = null)
    public ApiDocument(String name, ApiDocumentArgs args)
    public ApiDocument(String name, ApiDocumentArgs args, CustomResourceOptions options)
    
    type: konnect:ApiDocument
    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 ApiDocumentArgs
    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 ApiDocumentArgs
    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 ApiDocumentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiDocumentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiDocumentArgs
    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 apiDocumentResource = new Konnect.ApiDocument("apiDocumentResource", new()
    {
        ApiId = "string",
        Content = "string",
        ParentDocumentId = "string",
        Slug = "string",
        Status = "string",
        Title = "string",
    });
    
    example, err := konnect.NewApiDocument(ctx, "apiDocumentResource", &konnect.ApiDocumentArgs{
    	ApiId:            pulumi.String("string"),
    	Content:          pulumi.String("string"),
    	ParentDocumentId: pulumi.String("string"),
    	Slug:             pulumi.String("string"),
    	Status:           pulumi.String("string"),
    	Title:            pulumi.String("string"),
    })
    
    var apiDocumentResource = new ApiDocument("apiDocumentResource", ApiDocumentArgs.builder()
        .apiId("string")
        .content("string")
        .parentDocumentId("string")
        .slug("string")
        .status("string")
        .title("string")
        .build());
    
    api_document_resource = konnect.ApiDocument("apiDocumentResource",
        api_id="string",
        content="string",
        parent_document_id="string",
        slug="string",
        status="string",
        title="string")
    
    const apiDocumentResource = new konnect.ApiDocument("apiDocumentResource", {
        apiId: "string",
        content: "string",
        parentDocumentId: "string",
        slug: "string",
        status: "string",
        title: "string",
    });
    
    type: konnect:ApiDocument
    properties:
        apiId: string
        content: string
        parentDocumentId: string
        slug: string
        status: string
        title: string
    

    ApiDocument 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 ApiDocument resource accepts the following input properties:

    ApiId string
    The UUID API identifier
    Content string
    Raw markdown content to display in your Portal
    ParentDocumentId string
    API Documents may be rendered as a tree of files.
    Slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    Status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    Title string
    The title of the document. Used to populate the <title> tag for the page
    ApiId string
    The UUID API identifier
    Content string
    Raw markdown content to display in your Portal
    ParentDocumentId string
    API Documents may be rendered as a tree of files.
    Slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    Status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    Title string
    The title of the document. Used to populate the <title> tag for the page
    apiId String
    The UUID API identifier
    content String
    Raw markdown content to display in your Portal
    parentDocumentId String
    API Documents may be rendered as a tree of files.
    slug String
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status String
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title String
    The title of the document. Used to populate the <title> tag for the page
    apiId string
    The UUID API identifier
    content string
    Raw markdown content to display in your Portal
    parentDocumentId string
    API Documents may be rendered as a tree of files.
    slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title string
    The title of the document. Used to populate the <title> tag for the page
    api_id str
    The UUID API identifier
    content str
    Raw markdown content to display in your Portal
    parent_document_id str
    API Documents may be rendered as a tree of files.
    slug str
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status str
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title str
    The title of the document. Used to populate the <title> tag for the page
    apiId String
    The UUID API identifier
    content String
    Raw markdown content to display in your Portal
    parentDocumentId String
    API Documents may be rendered as a tree of files.
    slug String
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status String
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title String
    The title of the document. Used to populate the <title> tag for the page

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiDocument 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 ApiDocument Resource

    Get an existing ApiDocument 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?: ApiDocumentState, opts?: CustomResourceOptions): ApiDocument
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_id: Optional[str] = None,
            content: Optional[str] = None,
            created_at: Optional[str] = None,
            parent_document_id: Optional[str] = None,
            slug: Optional[str] = None,
            status: Optional[str] = None,
            title: Optional[str] = None,
            updated_at: Optional[str] = None) -> ApiDocument
    func GetApiDocument(ctx *Context, name string, id IDInput, state *ApiDocumentState, opts ...ResourceOption) (*ApiDocument, error)
    public static ApiDocument Get(string name, Input<string> id, ApiDocumentState? state, CustomResourceOptions? opts = null)
    public static ApiDocument get(String name, Output<String> id, ApiDocumentState state, CustomResourceOptions options)
    resources:  _:    type: konnect:ApiDocument    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:
    ApiId string
    The UUID API identifier
    Content string
    Raw markdown content to display in your Portal
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    ParentDocumentId string
    API Documents may be rendered as a tree of files.
    Slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    Status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    Title string
    The title of the document. Used to populate the <title> tag for the page
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    ApiId string
    The UUID API identifier
    Content string
    Raw markdown content to display in your Portal
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    ParentDocumentId string
    API Documents may be rendered as a tree of files.
    Slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    Status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    Title string
    The title of the document. Used to populate the <title> tag for the page
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    apiId String
    The UUID API identifier
    content String
    Raw markdown content to display in your Portal
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    parentDocumentId String
    API Documents may be rendered as a tree of files.
    slug String
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status String
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title String
    The title of the document. Used to populate the <title> tag for the page
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    apiId string
    The UUID API identifier
    content string
    Raw markdown content to display in your Portal
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    parentDocumentId string
    API Documents may be rendered as a tree of files.
    slug string
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status string
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title string
    The title of the document. Used to populate the <title> tag for the page
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    api_id str
    The UUID API identifier
    content str
    Raw markdown content to display in your Portal
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    parent_document_id str
    API Documents may be rendered as a tree of files.
    slug str
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status str
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title str
    The title of the document. Used to populate the <title> tag for the page
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    apiId String
    The UUID API identifier
    content String
    Raw markdown content to display in your Portal
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    parentDocumentId String
    API Documents may be rendered as a tree of files.
    slug String
    The slug is used in generated URLs to provide human readable paths. Defaults to slugify(title)
    status String
    If status=published the document will be visible in your live portal. Default: "unpublished"; must be one of ["published", "unpublished"]
    title String
    The title of the document. Used to populate the <title> tag for the page
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.

    Import

    $ pulumi import konnect:index/apiDocument:ApiDocument my_konnect_api_document '{"api_id": "9f5061ce-78f6-4452-9108-ad7c02821fd5", "id": "de5c9818-be5c-42e6-b514-e3d4bc30ddeb"}'
    

    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