UNPKG

@pulumi/kong

Version:

A Pulumi package for creating and managing Kong resources.

99 lines (98 loc) 3.53 kB
import * as pulumi from "@pulumi/pulumi"; /** * ## # 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](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/#consumer-object). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as kong from "@pulumi/kong"; * * const consumer = new kong.Consumer("consumer", { * username: "User1", * customId: "123", * tags: ["mySuperTag"], * }); * ``` * * ## Import * * To import a consumer: * * ```sh * $ pulumi import kong:index/consumer:Consumer <consumer_identifier> <consumer_id> * ``` */ export declare class Consumer extends pulumi.CustomResource { /** * Get an existing Consumer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConsumerState, opts?: pulumi.CustomResourceOptions): Consumer; /** * Returns true if the given object is an instance of Consumer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Consumer; /** * A custom id for the consumer, you must set either the username or custom_id */ readonly customId: pulumi.Output<string | undefined>; /** * A list of strings associated with the Consumer for grouping and filtering */ readonly tags: pulumi.Output<string[] | undefined>; /** * The username to use, you must set either the username or custom_id */ readonly username: pulumi.Output<string | undefined>; /** * Create a Consumer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ConsumerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Consumer resources. */ export interface ConsumerState { /** * A custom id for the consumer, you must set either the username or custom_id */ customId?: pulumi.Input<string>; /** * A list of strings associated with the Consumer for grouping and filtering */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The username to use, you must set either the username or custom_id */ username?: pulumi.Input<string>; } /** * The set of arguments for constructing a Consumer resource. */ export interface ConsumerArgs { /** * A custom id for the consumer, you must set either the username or custom_id */ customId?: pulumi.Input<string>; /** * A list of strings associated with the Consumer for grouping and filtering */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The username to use, you must set either the username or custom_id */ username?: pulumi.Input<string>; }