1. Packages
  2. Konnect Provider
  3. API Docs
  4. ApiProductDocument
konnect 2.4.1 published on Thursday, Mar 13, 2025 by kong

konnect.ApiProductDocument

Explore with Pulumi AI

APIProductDocument Resource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as konnect from "@pulumi/konnect";

const myApiproductdocument = new konnect.ApiProductDocument("myApiproductdocument", {
    apiProductId: "d32d905a-ed33-46a3-a093-d8f536af9a8a",
    content: "## My Markdown",
    metadata: {},
    parentDocumentId: "dd4e1b98-3629-4dd3-acc0-759a726ffee2",
    slug: "path-for-seo",
    status: "unpublished",
    title: "How to create a document in Konnect DocumentHub",
});
Copy
import pulumi
import pulumi_konnect as konnect

my_apiproductdocument = konnect.ApiProductDocument("myApiproductdocument",
    api_product_id="d32d905a-ed33-46a3-a093-d8f536af9a8a",
    content="## My Markdown",
    metadata={},
    parent_document_id="dd4e1b98-3629-4dd3-acc0-759a726ffee2",
    slug="path-for-seo",
    status="unpublished",
    title="How to create a document in Konnect DocumentHub")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/konnect/v2/konnect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := konnect.NewApiProductDocument(ctx, "myApiproductdocument", &konnect.ApiProductDocumentArgs{
			ApiProductId:     pulumi.String("d32d905a-ed33-46a3-a093-d8f536af9a8a"),
			Content:          pulumi.String("## My Markdown"),
			Metadata:         &konnect.ApiProductDocumentMetadataArgs{},
			ParentDocumentId: pulumi.String("dd4e1b98-3629-4dd3-acc0-759a726ffee2"),
			Slug:             pulumi.String("path-for-seo"),
			Status:           pulumi.String("unpublished"),
			Title:            pulumi.String("How to create a document in Konnect DocumentHub"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Konnect = Pulumi.Konnect;

return await Deployment.RunAsync(() => 
{
    var myApiproductdocument = new Konnect.ApiProductDocument("myApiproductdocument", new()
    {
        ApiProductId = "d32d905a-ed33-46a3-a093-d8f536af9a8a",
        Content = "## My Markdown",
        Metadata = null,
        ParentDocumentId = "dd4e1b98-3629-4dd3-acc0-759a726ffee2",
        Slug = "path-for-seo",
        Status = "unpublished",
        Title = "How to create a document in Konnect DocumentHub",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.konnect.ApiProductDocument;
import com.pulumi.konnect.ApiProductDocumentArgs;
import com.pulumi.konnect.inputs.ApiProductDocumentMetadataArgs;
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 myApiproductdocument = new ApiProductDocument("myApiproductdocument", ApiProductDocumentArgs.builder()
            .apiProductId("d32d905a-ed33-46a3-a093-d8f536af9a8a")
            .content("## My Markdown")
            .metadata()
            .parentDocumentId("dd4e1b98-3629-4dd3-acc0-759a726ffee2")
            .slug("path-for-seo")
            .status("unpublished")
            .title("How to create a document in Konnect DocumentHub")
            .build());

    }
}
Copy
resources:
  myApiproductdocument:
    type: konnect:ApiProductDocument
    properties:
      apiProductId: d32d905a-ed33-46a3-a093-d8f536af9a8a
      content: '## My Markdown'
      metadata: {}
      parentDocumentId: dd4e1b98-3629-4dd3-acc0-759a726ffee2
      slug: path-for-seo
      status: unpublished
      title: How to create a document in Konnect DocumentHub
Copy

Create ApiProductDocument Resource

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

Constructor syntax

new ApiProductDocument(name: string, args: ApiProductDocumentArgs, opts?: CustomResourceOptions);
@overload
def ApiProductDocument(resource_name: str,
                       args: ApiProductDocumentArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def ApiProductDocument(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       api_product_id: Optional[str] = None,
                       slug: Optional[str] = None,
                       status: Optional[str] = None,
                       title: Optional[str] = None,
                       content: Optional[str] = None,
                       metadata: Optional[ApiProductDocumentMetadataArgs] = None,
                       parent_document_id: Optional[str] = None)
func NewApiProductDocument(ctx *Context, name string, args ApiProductDocumentArgs, opts ...ResourceOption) (*ApiProductDocument, error)
public ApiProductDocument(string name, ApiProductDocumentArgs args, CustomResourceOptions? opts = null)
public ApiProductDocument(String name, ApiProductDocumentArgs args)
public ApiProductDocument(String name, ApiProductDocumentArgs args, CustomResourceOptions options)
type: konnect:ApiProductDocument
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ApiProductDocumentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ApiProductDocumentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ApiProductDocumentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApiProductDocumentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApiProductDocumentArgs
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 apiProductDocumentResource = new Konnect.ApiProductDocument("apiProductDocumentResource", new()
{
    ApiProductId = "string",
    Slug = "string",
    Status = "string",
    Title = "string",
    Content = "string",
    Metadata = null,
    ParentDocumentId = "string",
});
Copy
example, err := konnect.NewApiProductDocument(ctx, "apiProductDocumentResource", &konnect.ApiProductDocumentArgs{
ApiProductId: pulumi.String("string"),
Slug: pulumi.String("string"),
Status: pulumi.String("string"),
Title: pulumi.String("string"),
Content: pulumi.String("string"),
Metadata: &.ApiProductDocumentMetadataArgs{
},
ParentDocumentId: pulumi.String("string"),
})
Copy
var apiProductDocumentResource = new ApiProductDocument("apiProductDocumentResource", ApiProductDocumentArgs.builder()
    .apiProductId("string")
    .slug("string")
    .status("string")
    .title("string")
    .content("string")
    .metadata()
    .parentDocumentId("string")
    .build());
Copy
api_product_document_resource = konnect.ApiProductDocument("apiProductDocumentResource",
    api_product_id="string",
    slug="string",
    status="string",
    title="string",
    content="string",
    metadata={},
    parent_document_id="string")
Copy
const apiProductDocumentResource = new konnect.ApiProductDocument("apiProductDocumentResource", {
    apiProductId: "string",
    slug: "string",
    status: "string",
    title: "string",
    content: "string",
    metadata: {},
    parentDocumentId: "string",
});
Copy
type: konnect:ApiProductDocument
properties:
    apiProductId: string
    content: string
    metadata: {}
    parentDocumentId: string
    slug: string
    status: string
    title: string
Copy

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

ApiProductId This property is required. string
The API product identifier
Slug This property is required. string
document slug. must be unique accross documents belonging to an api product
Status This property is required. string
must be one of ["published", "unpublished"]
Title This property is required. string
document title
Content string
Can be markdown string content or base64 encoded string
Metadata ApiProductDocumentMetadata
metadata of the document
ParentDocumentId string
parent document id
ApiProductId This property is required. string
The API product identifier
Slug This property is required. string
document slug. must be unique accross documents belonging to an api product
Status This property is required. string
must be one of ["published", "unpublished"]
Title This property is required. string
document title
Content string
Can be markdown string content or base64 encoded string
Metadata ApiProductDocumentMetadataArgs
metadata of the document
ParentDocumentId string
parent document id
apiProductId This property is required. String
The API product identifier
slug This property is required. String
document slug. must be unique accross documents belonging to an api product
status This property is required. String
must be one of ["published", "unpublished"]
title This property is required. String
document title
content String
Can be markdown string content or base64 encoded string
metadata ApiProductDocumentMetadata
metadata of the document
parentDocumentId String
parent document id
apiProductId This property is required. string
The API product identifier
slug This property is required. string
document slug. must be unique accross documents belonging to an api product
status This property is required. string
must be one of ["published", "unpublished"]
title This property is required. string
document title
content string
Can be markdown string content or base64 encoded string
metadata ApiProductDocumentMetadata
metadata of the document
parentDocumentId string
parent document id
api_product_id This property is required. str
The API product identifier
slug This property is required. str
document slug. must be unique accross documents belonging to an api product
status This property is required. str
must be one of ["published", "unpublished"]
title This property is required. str
document title
content str
Can be markdown string content or base64 encoded string
metadata ApiProductDocumentMetadataArgs
metadata of the document
parent_document_id str
parent document id
apiProductId This property is required. String
The API product identifier
slug This property is required. String
document slug. must be unique accross documents belonging to an api product
status This property is required. String
must be one of ["published", "unpublished"]
title This property is required. String
document title
content String
Can be markdown string content or base64 encoded string
metadata Property Map
metadata of the document
parentDocumentId String
parent document id

Outputs

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

Get an existing ApiProductDocument 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?: ApiProductDocumentState, opts?: CustomResourceOptions): ApiProductDocument
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_product_id: Optional[str] = None,
        content: Optional[str] = None,
        created_at: Optional[str] = None,
        metadata: Optional[ApiProductDocumentMetadataArgs] = None,
        parent_document_id: Optional[str] = None,
        slug: Optional[str] = None,
        status: Optional[str] = None,
        title: Optional[str] = None,
        updated_at: Optional[str] = None) -> ApiProductDocument
func GetApiProductDocument(ctx *Context, name string, id IDInput, state *ApiProductDocumentState, opts ...ResourceOption) (*ApiProductDocument, error)
public static ApiProductDocument Get(string name, Input<string> id, ApiProductDocumentState? state, CustomResourceOptions? opts = null)
public static ApiProductDocument get(String name, Output<String> id, ApiProductDocumentState state, CustomResourceOptions options)
resources:  _:    type: konnect:ApiProductDocument    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApiProductId string
The API product identifier
Content string
Can be markdown string content or base64 encoded string
CreatedAt string
An ISO-8601 timestamp representation of entity creation date.
Metadata ApiProductDocumentMetadata
metadata of the document
ParentDocumentId string
parent document id
Slug string
document slug. must be unique accross documents belonging to an api product
Status string
must be one of ["published", "unpublished"]
Title string
document title
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
ApiProductId string
The API product identifier
Content string
Can be markdown string content or base64 encoded string
CreatedAt string
An ISO-8601 timestamp representation of entity creation date.
Metadata ApiProductDocumentMetadataArgs
metadata of the document
ParentDocumentId string
parent document id
Slug string
document slug. must be unique accross documents belonging to an api product
Status string
must be one of ["published", "unpublished"]
Title string
document title
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
apiProductId String
The API product identifier
content String
Can be markdown string content or base64 encoded string
createdAt String
An ISO-8601 timestamp representation of entity creation date.
metadata ApiProductDocumentMetadata
metadata of the document
parentDocumentId String
parent document id
slug String
document slug. must be unique accross documents belonging to an api product
status String
must be one of ["published", "unpublished"]
title String
document title
updatedAt String
An ISO-8601 timestamp representation of entity update date.
apiProductId string
The API product identifier
content string
Can be markdown string content or base64 encoded string
createdAt string
An ISO-8601 timestamp representation of entity creation date.
metadata ApiProductDocumentMetadata
metadata of the document
parentDocumentId string
parent document id
slug string
document slug. must be unique accross documents belonging to an api product
status string
must be one of ["published", "unpublished"]
title string
document title
updatedAt string
An ISO-8601 timestamp representation of entity update date.
api_product_id str
The API product identifier
content str
Can be markdown string content or base64 encoded string
created_at str
An ISO-8601 timestamp representation of entity creation date.
metadata ApiProductDocumentMetadataArgs
metadata of the document
parent_document_id str
parent document id
slug str
document slug. must be unique accross documents belonging to an api product
status str
must be one of ["published", "unpublished"]
title str
document title
updated_at str
An ISO-8601 timestamp representation of entity update date.
apiProductId String
The API product identifier
content String
Can be markdown string content or base64 encoded string
createdAt String
An ISO-8601 timestamp representation of entity creation date.
metadata Property Map
metadata of the document
parentDocumentId String
parent document id
slug String
document slug. must be unique accross documents belonging to an api product
status String
must be one of ["published", "unpublished"]
title String
document title
updatedAt String
An ISO-8601 timestamp representation of entity update date.

Import

$ pulumi import konnect:index/apiProductDocument:ApiProductDocument my_konnect_api_product_document "{ \"api_product_id\": \"d32d905a-ed33-46a3-a093-d8f536af9a8a\", \"id\": \"de5c9818-be5c-42e6-b514-e3d4bc30ddeb\"}"
Copy

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.