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

konnect.ApiPublication

Explore with Pulumi AI

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

    APIPublication Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as konnect from "@pulumi/konnect";
    
    const myApipublication = new konnect.ApiPublication("myApipublication", {
        apiId: "9f5061ce-78f6-4452-9108-ad7c02821fd5",
        authStrategyIds: ["9c3bed4d-0322-4ea0-ba19-a4bd65d821f6"],
        autoApproveRegistrations: true,
        portalId: "f32d905a-ed33-46a3-a093-d8f536af9a8a",
        visibility: "private",
    });
    
    import pulumi
    import pulumi_konnect as konnect
    
    my_apipublication = konnect.ApiPublication("myApipublication",
        api_id="9f5061ce-78f6-4452-9108-ad7c02821fd5",
        auth_strategy_ids=["9c3bed4d-0322-4ea0-ba19-a4bd65d821f6"],
        auto_approve_registrations=True,
        portal_id="f32d905a-ed33-46a3-a093-d8f536af9a8a",
        visibility="private")
    
    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.NewApiPublication(ctx, "myApipublication", &konnect.ApiPublicationArgs{
    			ApiId: pulumi.String("9f5061ce-78f6-4452-9108-ad7c02821fd5"),
    			AuthStrategyIds: pulumi.StringArray{
    				pulumi.String("9c3bed4d-0322-4ea0-ba19-a4bd65d821f6"),
    			},
    			AutoApproveRegistrations: pulumi.Bool(true),
    			PortalId:                 pulumi.String("f32d905a-ed33-46a3-a093-d8f536af9a8a"),
    			Visibility:               pulumi.String("private"),
    		})
    		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 myApipublication = new Konnect.ApiPublication("myApipublication", new()
        {
            ApiId = "9f5061ce-78f6-4452-9108-ad7c02821fd5",
            AuthStrategyIds = new[]
            {
                "9c3bed4d-0322-4ea0-ba19-a4bd65d821f6",
            },
            AutoApproveRegistrations = true,
            PortalId = "f32d905a-ed33-46a3-a093-d8f536af9a8a",
            Visibility = "private",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.konnect.ApiPublication;
    import com.pulumi.konnect.ApiPublicationArgs;
    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 myApipublication = new ApiPublication("myApipublication", ApiPublicationArgs.builder()
                .apiId("9f5061ce-78f6-4452-9108-ad7c02821fd5")
                .authStrategyIds("9c3bed4d-0322-4ea0-ba19-a4bd65d821f6")
                .autoApproveRegistrations(true)
                .portalId("f32d905a-ed33-46a3-a093-d8f536af9a8a")
                .visibility("private")
                .build());
    
        }
    }
    
    resources:
      myApipublication:
        type: konnect:ApiPublication
        properties:
          apiId: 9f5061ce-78f6-4452-9108-ad7c02821fd5
          authStrategyIds:
            - 9c3bed4d-0322-4ea0-ba19-a4bd65d821f6
          autoApproveRegistrations: true
          portalId: f32d905a-ed33-46a3-a093-d8f536af9a8a
          visibility: private
    

    Create ApiPublication Resource

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

    Constructor syntax

    new ApiPublication(name: string, args: ApiPublicationArgs, opts?: CustomResourceOptions);
    @overload
    def ApiPublication(resource_name: str,
                       args: ApiPublicationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiPublication(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       api_id: Optional[str] = None,
                       portal_id: Optional[str] = None,
                       auth_strategy_ids: Optional[Sequence[str]] = None,
                       auto_approve_registrations: Optional[bool] = None,
                       visibility: Optional[str] = None)
    func NewApiPublication(ctx *Context, name string, args ApiPublicationArgs, opts ...ResourceOption) (*ApiPublication, error)
    public ApiPublication(string name, ApiPublicationArgs args, CustomResourceOptions? opts = null)
    public ApiPublication(String name, ApiPublicationArgs args)
    public ApiPublication(String name, ApiPublicationArgs args, CustomResourceOptions options)
    
    type: konnect:ApiPublication
    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 ApiPublicationArgs
    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 ApiPublicationArgs
    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 ApiPublicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiPublicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiPublicationArgs
    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 apiPublicationResource = new Konnect.ApiPublication("apiPublicationResource", new()
    {
        ApiId = "string",
        PortalId = "string",
        AuthStrategyIds = new[]
        {
            "string",
        },
        AutoApproveRegistrations = false,
        Visibility = "string",
    });
    
    example, err := konnect.NewApiPublication(ctx, "apiPublicationResource", &konnect.ApiPublicationArgs{
    	ApiId:    pulumi.String("string"),
    	PortalId: pulumi.String("string"),
    	AuthStrategyIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AutoApproveRegistrations: pulumi.Bool(false),
    	Visibility:               pulumi.String("string"),
    })
    
    var apiPublicationResource = new ApiPublication("apiPublicationResource", ApiPublicationArgs.builder()
        .apiId("string")
        .portalId("string")
        .authStrategyIds("string")
        .autoApproveRegistrations(false)
        .visibility("string")
        .build());
    
    api_publication_resource = konnect.ApiPublication("apiPublicationResource",
        api_id="string",
        portal_id="string",
        auth_strategy_ids=["string"],
        auto_approve_registrations=False,
        visibility="string")
    
    const apiPublicationResource = new konnect.ApiPublication("apiPublicationResource", {
        apiId: "string",
        portalId: "string",
        authStrategyIds: ["string"],
        autoApproveRegistrations: false,
        visibility: "string",
    });
    
    type: konnect:ApiPublication
    properties:
        apiId: string
        authStrategyIds:
            - string
        autoApproveRegistrations: false
        portalId: string
        visibility: string
    

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

    ApiId string
    The UUID API identifier
    PortalId string
    The Portal identifier
    AuthStrategyIds List<string>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    AutoApproveRegistrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    Visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    ApiId string
    The UUID API identifier
    PortalId string
    The Portal identifier
    AuthStrategyIds []string
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    AutoApproveRegistrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    Visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId String
    The UUID API identifier
    portalId String
    The Portal identifier
    authStrategyIds List<String>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations Boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    visibility String
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId string
    The UUID API identifier
    portalId string
    The Portal identifier
    authStrategyIds string[]
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    api_id str
    The UUID API identifier
    portal_id str
    The Portal identifier
    auth_strategy_ids Sequence[str]
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    auto_approve_registrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    visibility str
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId String
    The UUID API identifier
    portalId String
    The Portal identifier
    authStrategyIds List<String>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations Boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    visibility String
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]

    Outputs

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

    Get an existing ApiPublication 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?: ApiPublicationState, opts?: CustomResourceOptions): ApiPublication
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_id: Optional[str] = None,
            auth_strategy_ids: Optional[Sequence[str]] = None,
            auto_approve_registrations: Optional[bool] = None,
            created_at: Optional[str] = None,
            portal_id: Optional[str] = None,
            updated_at: Optional[str] = None,
            visibility: Optional[str] = None) -> ApiPublication
    func GetApiPublication(ctx *Context, name string, id IDInput, state *ApiPublicationState, opts ...ResourceOption) (*ApiPublication, error)
    public static ApiPublication Get(string name, Input<string> id, ApiPublicationState? state, CustomResourceOptions? opts = null)
    public static ApiPublication get(String name, Output<String> id, ApiPublicationState state, CustomResourceOptions options)
    resources:  _:    type: konnect:ApiPublication    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
    AuthStrategyIds List<string>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    AutoApproveRegistrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    PortalId string
    The Portal identifier
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    Visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    ApiId string
    The UUID API identifier
    AuthStrategyIds []string
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    AutoApproveRegistrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    PortalId string
    The Portal identifier
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    Visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId String
    The UUID API identifier
    authStrategyIds List<String>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations Boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    portalId String
    The Portal identifier
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    visibility String
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId string
    The UUID API identifier
    authStrategyIds string[]
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    portalId string
    The Portal identifier
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    visibility string
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    api_id str
    The UUID API identifier
    auth_strategy_ids Sequence[str]
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    auto_approve_registrations bool
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    portal_id str
    The Portal identifier
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    visibility str
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]
    apiId String
    The UUID API identifier
    authStrategyIds List<String>
    The auth strategy the API enforces for applications in the portal. Omitting this property means the portal's default application auth strategy will be used. Setting to null means the API will not require application authentication. DCR support for application registration is currently in development.
    autoApproveRegistrations Boolean
    Whether the application registration auto approval on this portal for the api is enabled. If set to false, fallbacks on portal's autoapproveapplications value.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    portalId String
    The Portal identifier
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    visibility String
    The visibility of the API in the portal. Public API publications do not require authentication to view and retrieve information about them. Private API publications require authentication to retrieve information about them. Default: "private"; must be one of ["public", "private"]

    Import

    $ pulumi import konnect:index/apiPublication:ApiPublication my_konnect_api_publication '{"api_id": "9f5061ce-78f6-4452-9108-ad7c02821fd5", "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