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

konnect.GatewayConsumer

Explore with Pulumi AI

GatewayConsumer Resource

Example Usage

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

const myGatewayconsumer = new konnect.GatewayConsumer("myGatewayconsumer", {
    controlPlaneId: "9524ec7d-36d9-465d-a8c5-83a3c9390458",
    customId: "...my_custom_id...",
    gatewayConsumerId: "...my_id...",
    tags: ["..."],
    username: "...my_username...",
});
Copy
import pulumi
import pulumi_konnect as konnect

my_gatewayconsumer = konnect.GatewayConsumer("myGatewayconsumer",
    control_plane_id="9524ec7d-36d9-465d-a8c5-83a3c9390458",
    custom_id="...my_custom_id...",
    gateway_consumer_id="...my_id...",
    tags=["..."],
    username="...my_username...")
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.NewGatewayConsumer(ctx, "myGatewayconsumer", &konnect.GatewayConsumerArgs{
			ControlPlaneId:    pulumi.String("9524ec7d-36d9-465d-a8c5-83a3c9390458"),
			CustomId:          pulumi.String("...my_custom_id..."),
			GatewayConsumerId: pulumi.String("...my_id..."),
			Tags: pulumi.StringArray{
				pulumi.String("..."),
			},
			Username: pulumi.String("...my_username..."),
		})
		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 myGatewayconsumer = new Konnect.GatewayConsumer("myGatewayconsumer", new()
    {
        ControlPlaneId = "9524ec7d-36d9-465d-a8c5-83a3c9390458",
        CustomId = "...my_custom_id...",
        GatewayConsumerId = "...my_id...",
        Tags = new[]
        {
            "...",
        },
        Username = "...my_username...",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.konnect.GatewayConsumer;
import com.pulumi.konnect.GatewayConsumerArgs;
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 myGatewayconsumer = new GatewayConsumer("myGatewayconsumer", GatewayConsumerArgs.builder()
            .controlPlaneId("9524ec7d-36d9-465d-a8c5-83a3c9390458")
            .customId("...my_custom_id...")
            .gatewayConsumerId("...my_id...")
            .tags("...")
            .username("...my_username...")
            .build());

    }
}
Copy
resources:
  myGatewayconsumer:
    type: konnect:GatewayConsumer
    properties:
      controlPlaneId: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      customId: '...my_custom_id...'
      gatewayConsumerId: '...my_id...'
      tags:
        - '...'
      username: '...my_username...'
Copy

Create GatewayConsumer Resource

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

Constructor syntax

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

@overload
def GatewayConsumer(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    control_plane_id: Optional[str] = None,
                    custom_id: Optional[str] = None,
                    gateway_consumer_id: Optional[str] = None,
                    tags: Optional[Sequence[str]] = None,
                    username: Optional[str] = None)
func NewGatewayConsumer(ctx *Context, name string, args GatewayConsumerArgs, opts ...ResourceOption) (*GatewayConsumer, error)
public GatewayConsumer(string name, GatewayConsumerArgs args, CustomResourceOptions? opts = null)
public GatewayConsumer(String name, GatewayConsumerArgs args)
public GatewayConsumer(String name, GatewayConsumerArgs args, CustomResourceOptions options)
type: konnect:GatewayConsumer
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. GatewayConsumerArgs
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. GatewayConsumerArgs
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. GatewayConsumerArgs
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. GatewayConsumerArgs
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. GatewayConsumerArgs
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 gatewayConsumerResource = new Konnect.GatewayConsumer("gatewayConsumerResource", new()
{
    ControlPlaneId = "string",
    CustomId = "string",
    GatewayConsumerId = "string",
    Tags = new[]
    {
        "string",
    },
    Username = "string",
});
Copy
example, err := konnect.NewGatewayConsumer(ctx, "gatewayConsumerResource", &konnect.GatewayConsumerArgs{
ControlPlaneId: pulumi.String("string"),
CustomId: pulumi.String("string"),
GatewayConsumerId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Username: pulumi.String("string"),
})
Copy
var gatewayConsumerResource = new GatewayConsumer("gatewayConsumerResource", GatewayConsumerArgs.builder()
    .controlPlaneId("string")
    .customId("string")
    .gatewayConsumerId("string")
    .tags("string")
    .username("string")
    .build());
Copy
gateway_consumer_resource = konnect.GatewayConsumer("gatewayConsumerResource",
    control_plane_id="string",
    custom_id="string",
    gateway_consumer_id="string",
    tags=["string"],
    username="string")
Copy
const gatewayConsumerResource = new konnect.GatewayConsumer("gatewayConsumerResource", {
    controlPlaneId: "string",
    customId: "string",
    gatewayConsumerId: "string",
    tags: ["string"],
    username: "string",
});
Copy
type: konnect:GatewayConsumer
properties:
    controlPlaneId: string
    customId: string
    gatewayConsumerId: string
    tags:
        - string
    username: string
Copy

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

ControlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CustomId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
GatewayConsumerId string
The ID of this resource.
Tags List<string>
An optional set of strings associated with the Consumer for grouping and filtering.
Username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
ControlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CustomId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
GatewayConsumerId string
The ID of this resource.
Tags []string
An optional set of strings associated with the Consumer for grouping and filtering.
Username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId This property is required. String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
customId String
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId String
The ID of this resource.
tags List<String>
An optional set of strings associated with the Consumer for grouping and filtering.
username String
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId This property is required. string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
customId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId string
The ID of this resource.
tags string[]
An optional set of strings associated with the Consumer for grouping and filtering.
username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
control_plane_id This property is required. str
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
custom_id str
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gateway_consumer_id str
The ID of this resource.
tags Sequence[str]
An optional set of strings associated with the Consumer for grouping and filtering.
username str
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId This property is required. String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
customId String
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId String
The ID of this resource.
tags List<String>
An optional set of strings associated with the Consumer for grouping and filtering.
username String
The unique username of the Consumer. You must send either this field or custom_id with the request.

Outputs

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

CreatedAt double
Unix epoch when the resource was created.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt double
Unix epoch when the resource was last updated.
CreatedAt float64
Unix epoch when the resource was created.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt float64
Unix epoch when the resource was last updated.
createdAt Double
Unix epoch when the resource was created.
id String
The provider-assigned unique ID for this managed resource.
updatedAt Double
Unix epoch when the resource was last updated.
createdAt number
Unix epoch when the resource was created.
id string
The provider-assigned unique ID for this managed resource.
updatedAt number
Unix epoch when the resource was last updated.
created_at float
Unix epoch when the resource was created.
id str
The provider-assigned unique ID for this managed resource.
updated_at float
Unix epoch when the resource was last updated.
createdAt Number
Unix epoch when the resource was created.
id String
The provider-assigned unique ID for this managed resource.
updatedAt Number
Unix epoch when the resource was last updated.

Look up Existing GatewayConsumer Resource

Get an existing GatewayConsumer 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?: GatewayConsumerState, opts?: CustomResourceOptions): GatewayConsumer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        control_plane_id: Optional[str] = None,
        created_at: Optional[float] = None,
        custom_id: Optional[str] = None,
        gateway_consumer_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        updated_at: Optional[float] = None,
        username: Optional[str] = None) -> GatewayConsumer
func GetGatewayConsumer(ctx *Context, name string, id IDInput, state *GatewayConsumerState, opts ...ResourceOption) (*GatewayConsumer, error)
public static GatewayConsumer Get(string name, Input<string> id, GatewayConsumerState? state, CustomResourceOptions? opts = null)
public static GatewayConsumer get(String name, Output<String> id, GatewayConsumerState state, CustomResourceOptions options)
resources:  _:    type: konnect:GatewayConsumer    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:
ControlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CreatedAt double
Unix epoch when the resource was created.
CustomId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
GatewayConsumerId string
The ID of this resource.
Tags List<string>
An optional set of strings associated with the Consumer for grouping and filtering.
UpdatedAt double
Unix epoch when the resource was last updated.
Username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
ControlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
CreatedAt float64
Unix epoch when the resource was created.
CustomId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
GatewayConsumerId string
The ID of this resource.
Tags []string
An optional set of strings associated with the Consumer for grouping and filtering.
UpdatedAt float64
Unix epoch when the resource was last updated.
Username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt Double
Unix epoch when the resource was created.
customId String
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId String
The ID of this resource.
tags List<String>
An optional set of strings associated with the Consumer for grouping and filtering.
updatedAt Double
Unix epoch when the resource was last updated.
username String
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId string
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt number
Unix epoch when the resource was created.
customId string
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId string
The ID of this resource.
tags string[]
An optional set of strings associated with the Consumer for grouping and filtering.
updatedAt number
Unix epoch when the resource was last updated.
username string
The unique username of the Consumer. You must send either this field or custom_id with the request.
control_plane_id str
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
created_at float
Unix epoch when the resource was created.
custom_id str
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gateway_consumer_id str
The ID of this resource.
tags Sequence[str]
An optional set of strings associated with the Consumer for grouping and filtering.
updated_at float
Unix epoch when the resource was last updated.
username str
The unique username of the Consumer. You must send either this field or custom_id with the request.
controlPlaneId String
The UUID of your control plane. This variable is available in the Konnect manager. Requires replacement if changed.
createdAt Number
Unix epoch when the resource was created.
customId String
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request.
gatewayConsumerId String
The ID of this resource.
tags List<String>
An optional set of strings associated with the Consumer for grouping and filtering.
updatedAt Number
Unix epoch when the resource was last updated.
username String
The unique username of the Consumer. You must send either this field or custom_id with the request.

Import

$ pulumi import konnect:index/gatewayConsumer:GatewayConsumer my_konnect_gateway_consumer "{ \"consumer_id\": \"c1059869-6fa7-4329-a5f5-5946d14ca2c5\", \"control_plane_id\": \"9524ec7d-36d9-465d-a8c5-83a3c9390458\"}"
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.