Kong

Pulumi Official
Package maintained by Pulumi
v4.5.0 published on Tuesday, Mar 29, 2022 by Pulumi

Consumer

# kong.Consumer

The consumer resource maps directly onto the json for creating a Consumer in Kong. For more information on the parameters see the Kong Consumer create documentation.

Example Usage

using Pulumi;
using Kong = Pulumi.Kong;

class MyStack : Stack
{
    public MyStack()
    {
        var consumer = new Kong.Consumer("consumer", new Kong.ConsumerArgs
        {
            CustomId = "123",
            Tags = 
            {
                "mySuperTag",
            },
            Username = "User1",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-kong/sdk/v4/go/kong"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kong.NewConsumer(ctx, "consumer", &kong.ConsumerArgs{
			CustomId: pulumi.String("123"),
			Tags: pulumi.StringArray{
				pulumi.String("mySuperTag"),
			},
			Username: pulumi.String("User1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_kong as kong

consumer = kong.Consumer("consumer",
    custom_id="123",
    tags=["mySuperTag"],
    username="User1")
import * as pulumi from "@pulumi/pulumi";
import * as kong from "@pulumi/kong";

const consumer = new kong.Consumer("consumer", {
    customId: "123",
    tags: ["mySuperTag"],
    username: "User1",
});

Coming soon!

Create a Consumer Resource

new Consumer(name: string, args?: ConsumerArgs, opts?: CustomResourceOptions);
@overload
def Consumer(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             custom_id: Optional[str] = None,
             tags: Optional[Sequence[str]] = None,
             username: Optional[str] = None)
@overload
def Consumer(resource_name: str,
             args: Optional[ConsumerArgs] = None,
             opts: Optional[ResourceOptions] = None)
func NewConsumer(ctx *Context, name string, args *ConsumerArgs, opts ...ResourceOption) (*Consumer, error)
public Consumer(string name, ConsumerArgs? args = null, CustomResourceOptions? opts = null)
public Consumer(String name, ConsumerArgs args)
public Consumer(String name, ConsumerArgs args, CustomResourceOptions options)
type: kong:Consumer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ConsumerArgs
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 ConsumerArgs
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 ConsumerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ConsumerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ConsumerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Consumer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Consumer resource accepts the following input properties:

CustomId string

A custom id for the consumer, you must set either the username or custom_id

Tags List<string>

A list of strings associated with the Consumer for grouping and filtering

Username string

The username to use, you must set either the username or custom_id

CustomId string

A custom id for the consumer, you must set either the username or custom_id

Tags []string

A list of strings associated with the Consumer for grouping and filtering

Username string

The username to use, you must set either the username or custom_id

customId String

A custom id for the consumer, you must set either the username or custom_id

tags List<String>

A list of strings associated with the Consumer for grouping and filtering

username String

The username to use, you must set either the username or custom_id

customId string

A custom id for the consumer, you must set either the username or custom_id

tags string[]

A list of strings associated with the Consumer for grouping and filtering

username string

The username to use, you must set either the username or custom_id

custom_id str

A custom id for the consumer, you must set either the username or custom_id

tags Sequence[str]

A list of strings associated with the Consumer for grouping and filtering

username str

The username to use, you must set either the username or custom_id

customId String

A custom id for the consumer, you must set either the username or custom_id

tags List<String>

A list of strings associated with the Consumer for grouping and filtering

username String

The username to use, you must set either the username or custom_id

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Consumer Resource

Get an existing Consumer 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?: ConsumerState, opts?: CustomResourceOptions): Consumer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        custom_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        username: Optional[str] = None) -> Consumer
func GetConsumer(ctx *Context, name string, id IDInput, state *ConsumerState, opts ...ResourceOption) (*Consumer, error)
public static Consumer Get(string name, Input<string> id, ConsumerState? state, CustomResourceOptions? opts = null)
public static Consumer get(String name, Output<String> id, ConsumerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
CustomId string

A custom id for the consumer, you must set either the username or custom_id

Tags List<string>

A list of strings associated with the Consumer for grouping and filtering

Username string

The username to use, you must set either the username or custom_id

CustomId string

A custom id for the consumer, you must set either the username or custom_id

Tags []string

A list of strings associated with the Consumer for grouping and filtering

Username string

The username to use, you must set either the username or custom_id

customId String

A custom id for the consumer, you must set either the username or custom_id

tags List<String>

A list of strings associated with the Consumer for grouping and filtering

username String

The username to use, you must set either the username or custom_id

customId string

A custom id for the consumer, you must set either the username or custom_id

tags string[]

A list of strings associated with the Consumer for grouping and filtering

username string

The username to use, you must set either the username or custom_id

custom_id str

A custom id for the consumer, you must set either the username or custom_id

tags Sequence[str]

A list of strings associated with the Consumer for grouping and filtering

username str

The username to use, you must set either the username or custom_id

customId String

A custom id for the consumer, you must set either the username or custom_id

tags List<String>

A list of strings associated with the Consumer for grouping and filtering

username String

The username to use, you must set either the username or custom_id

Import

To import a consumer

 $ pulumi import kong:index/consumer:Consumer <consumer_identifier> <consumer_id>

Package Details

Repository
https://github.com/pulumi/pulumi-kong
License
Apache-2.0
Notes

This Pulumi package is based on the kong Terraform Provider.