1. Packages
  2. Konnect Provider
  3. API Docs
  4. ApiProduct
konnect 2.5.0 published on Tuesday, Apr 15, 2025 by kong

konnect.ApiProduct

Explore with Pulumi AI

APIProduct Resource

Example Usage

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

const myApiproduct = new konnect.ApiProduct("myApiproduct", {
    description: "Text describing the API product",
    labels: {
        key: "value",
    },
    portalIds: [],
    publicLabels: {
        key: "value",
    },
});
Copy
import pulumi
import pulumi_konnect as konnect

my_apiproduct = konnect.ApiProduct("myApiproduct",
    description="Text describing the API product",
    labels={
        "key": "value",
    },
    portal_ids=[],
    public_labels={
        "key": "value",
    })
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.NewApiProduct(ctx, "myApiproduct", &konnect.ApiProductArgs{
			Description: pulumi.String("Text describing the API product"),
			Labels: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
			PortalIds: pulumi.StringArray{},
			PublicLabels: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
		})
		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 myApiproduct = new Konnect.ApiProduct("myApiproduct", new()
    {
        Description = "Text describing the API product",
        Labels = 
        {
            { "key", "value" },
        },
        PortalIds = new[] {},
        PublicLabels = 
        {
            { "key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.konnect.ApiProduct;
import com.pulumi.konnect.ApiProductArgs;
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 myApiproduct = new ApiProduct("myApiproduct", ApiProductArgs.builder()
            .description("Text describing the API product")
            .labels(Map.of("key", "value"))
            .portalIds()
            .publicLabels(Map.of("key", "value"))
            .build());

    }
}
Copy
resources:
  myApiproduct:
    type: konnect:ApiProduct
    properties:
      description: Text describing the API product
      labels:
        key: value
      portalIds: []
      publicLabels:
        key: value
Copy

Create ApiProduct Resource

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

Constructor syntax

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

@overload
def ApiProduct(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               portal_ids: Optional[Sequence[str]] = None,
               description: Optional[str] = None,
               labels: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None,
               public_labels: Optional[Mapping[str, str]] = None)
func NewApiProduct(ctx *Context, name string, args ApiProductArgs, opts ...ResourceOption) (*ApiProduct, error)
public ApiProduct(string name, ApiProductArgs args, CustomResourceOptions? opts = null)
public ApiProduct(String name, ApiProductArgs args)
public ApiProduct(String name, ApiProductArgs args, CustomResourceOptions options)
type: konnect:ApiProduct
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. ApiProductArgs
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. ApiProductArgs
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. ApiProductArgs
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. ApiProductArgs
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. ApiProductArgs
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 apiProductResource = new Konnect.ApiProduct("apiProductResource", new()
{
    PortalIds = new[]
    {
        "string",
    },
    Description = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
    PublicLabels = 
    {
        { "string", "string" },
    },
});
Copy
example, err := konnect.NewApiProduct(ctx, "apiProductResource", &konnect.ApiProductArgs{
PortalIds: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
PublicLabels: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
Copy
var apiProductResource = new ApiProduct("apiProductResource", ApiProductArgs.builder()
    .portalIds("string")
    .description("string")
    .labels(Map.of("string", "string"))
    .name("string")
    .publicLabels(Map.of("string", "string"))
    .build());
Copy
api_product_resource = konnect.ApiProduct("apiProductResource",
    portal_ids=["string"],
    description="string",
    labels={
        "string": "string",
    },
    name="string",
    public_labels={
        "string": "string",
    })
Copy
const apiProductResource = new konnect.ApiProduct("apiProductResource", {
    portalIds: ["string"],
    description: "string",
    labels: {
        string: "string",
    },
    name: "string",
    publicLabels: {
        string: "string",
    },
});
Copy
type: konnect:ApiProduct
properties:
    description: string
    labels:
        string: string
    name: string
    portalIds:
        - string
    publicLabels:
        string: string
Copy

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

PortalIds This property is required. List<string>
The list of portal identifiers which this API product should be published to
Description string
The description of the API product.
Labels Dictionary<string, string>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Name string
The name of the API product.
PublicLabels Dictionary<string, string>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
PortalIds This property is required. []string
The list of portal identifiers which this API product should be published to
Description string
The description of the API product.
Labels map[string]string
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Name string
The name of the API product.
PublicLabels map[string]string
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
portalIds This property is required. List<String>
The list of portal identifiers which this API product should be published to
description String
The description of the API product.
labels Map<String,String>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name String
The name of the API product.
publicLabels Map<String,String>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
portalIds This property is required. string[]
The list of portal identifiers which this API product should be published to
description string
The description of the API product.
labels {[key: string]: string}
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name string
The name of the API product.
publicLabels {[key: string]: string}
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
portal_ids This property is required. Sequence[str]
The list of portal identifiers which this API product should be published to
description str
The description of the API product.
labels Mapping[str, str]
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name str
The name of the API product.
public_labels Mapping[str, str]
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
portalIds This property is required. List<String>
The list of portal identifiers which this API product should be published to
description String
The description of the API product.
labels Map<String>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name String
The name of the API product.
publicLabels Map<String>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiProduct 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.
Portals List<ApiProductPortal>
The list of portals which this API product is published to
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
VersionCount double
The number of product versions attached to this API product
CreatedAt string
An ISO-8601 timestamp representation of entity creation date.
Id string
The provider-assigned unique ID for this managed resource.
Portals []ApiProductPortal
The list of portals which this API product is published to
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
VersionCount float64
The number of product versions attached to this API product
createdAt String
An ISO-8601 timestamp representation of entity creation date.
id String
The provider-assigned unique ID for this managed resource.
portals List<ApiProductPortal>
The list of portals which this API product is published to
updatedAt String
An ISO-8601 timestamp representation of entity update date.
versionCount Double
The number of product versions attached to this API product
createdAt string
An ISO-8601 timestamp representation of entity creation date.
id string
The provider-assigned unique ID for this managed resource.
portals ApiProductPortal[]
The list of portals which this API product is published to
updatedAt string
An ISO-8601 timestamp representation of entity update date.
versionCount number
The number of product versions attached to this API product
created_at str
An ISO-8601 timestamp representation of entity creation date.
id str
The provider-assigned unique ID for this managed resource.
portals Sequence[ApiProductPortal]
The list of portals which this API product is published to
updated_at str
An ISO-8601 timestamp representation of entity update date.
version_count float
The number of product versions attached to this API product
createdAt String
An ISO-8601 timestamp representation of entity creation date.
id String
The provider-assigned unique ID for this managed resource.
portals List<Property Map>
The list of portals which this API product is published to
updatedAt String
An ISO-8601 timestamp representation of entity update date.
versionCount Number
The number of product versions attached to this API product

Look up Existing ApiProduct Resource

Get an existing ApiProduct 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?: ApiProductState, opts?: CustomResourceOptions): ApiProduct
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        portal_ids: Optional[Sequence[str]] = None,
        portals: Optional[Sequence[ApiProductPortalArgs]] = None,
        public_labels: Optional[Mapping[str, str]] = None,
        updated_at: Optional[str] = None,
        version_count: Optional[float] = None) -> ApiProduct
func GetApiProduct(ctx *Context, name string, id IDInput, state *ApiProductState, opts ...ResourceOption) (*ApiProduct, error)
public static ApiProduct Get(string name, Input<string> id, ApiProductState? state, CustomResourceOptions? opts = null)
public static ApiProduct get(String name, Output<String> id, ApiProductState state, CustomResourceOptions options)
resources:  _:    type: konnect:ApiProduct    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:
CreatedAt string
An ISO-8601 timestamp representation of entity creation date.
Description string
The description of the API product.
Labels Dictionary<string, string>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Name string
The name of the API product.
PortalIds List<string>
The list of portal identifiers which this API product should be published to
Portals List<ApiProductPortal>
The list of portals which this API product is published to
PublicLabels Dictionary<string, string>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
VersionCount double
The number of product versions attached to this API product
CreatedAt string
An ISO-8601 timestamp representation of entity creation date.
Description string
The description of the API product.
Labels map[string]string
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Name string
The name of the API product.
PortalIds []string
The list of portal identifiers which this API product should be published to
Portals []ApiProductPortalArgs
The list of portals which this API product is published to
PublicLabels map[string]string
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
UpdatedAt string
An ISO-8601 timestamp representation of entity update date.
VersionCount float64
The number of product versions attached to this API product
createdAt String
An ISO-8601 timestamp representation of entity creation date.
description String
The description of the API product.
labels Map<String,String>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name String
The name of the API product.
portalIds List<String>
The list of portal identifiers which this API product should be published to
portals List<ApiProductPortal>
The list of portals which this API product is published to
publicLabels Map<String,String>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
updatedAt String
An ISO-8601 timestamp representation of entity update date.
versionCount Double
The number of product versions attached to this API product
createdAt string
An ISO-8601 timestamp representation of entity creation date.
description string
The description of the API product.
labels {[key: string]: string}
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name string
The name of the API product.
portalIds string[]
The list of portal identifiers which this API product should be published to
portals ApiProductPortal[]
The list of portals which this API product is published to
publicLabels {[key: string]: string}
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
updatedAt string
An ISO-8601 timestamp representation of entity update date.
versionCount number
The number of product versions attached to this API product
created_at str
An ISO-8601 timestamp representation of entity creation date.
description str
The description of the API product.
labels Mapping[str, str]
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name str
The name of the API product.
portal_ids Sequence[str]
The list of portal identifiers which this API product should be published to
portals Sequence[ApiProductPortalArgs]
The list of portals which this API product is published to
public_labels Mapping[str, str]
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
updated_at str
An ISO-8601 timestamp representation of entity update date.
version_count float
The number of product versions attached to this API product
createdAt String
An ISO-8601 timestamp representation of entity creation date.
description String
The description of the API product.
labels Map<String>
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
name String
The name of the API product.
portalIds List<String>
The list of portal identifiers which this API product should be published to
portals List<Property Map>
The list of portals which this API product is published to
publicLabels Map<String>
Public labels store information about an entity that can be used for filtering a list of objects. Public labels are intended to store PUBLIC metadata. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
updatedAt String
An ISO-8601 timestamp representation of entity update date.
versionCount Number
The number of product versions attached to this API product

Supporting Types

ApiProductPortal
, ApiProductPortalArgs

PortalId string
PortalName string
PortalId string
PortalName string
portalId String
portalName String
portalId string
portalName string
portalId String
portalName String

Import

$ pulumi import konnect:index/apiProduct:ApiProduct my_konnect_api_product "d32d905a-ed33-46a3-a093-d8f536af9a8a"
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.