@pulumi/kong
Version:
A Pulumi package for creating and managing Kong resources.
160 lines (159 loc) • 6.21 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## # kong.ConsumerOauth2
*
* Resource that allows you to configure the OAuth2 plugin credentials for a consumer.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as kong from "@pulumi/kong";
*
* const myConsumer = new kong.Consumer("my_consumer", {
* username: "User1",
* customId: "123",
* });
* const oauth2Plugin = new kong.Plugin("oauth2_plugin", {
* name: "oauth2",
* configJson: `\x09{
* \x09\x09"global_credentials": true,
* \x09\x09"enable_password_grant": true,
* \x09\x09"token_expiration": 180,
* \x09\x09"refresh_token_ttl": 180,
* \x09\x09"provision_key": "testprovisionkey"
* \x09}
* `,
* });
* const consumerOauth2 = new kong.ConsumerOauth2("consumer_oauth2", {
* name: "test_application",
* consumerId: myConsumer.id,
* clientId: "client_id",
* clientSecret: "client_secret",
* redirectUris: [
* "https://asdf.com/callback",
* "https://test.cl/callback",
* ],
* tags: ["myTag"],
* });
* ```
*/
export declare class ConsumerOauth2 extends pulumi.CustomResource {
/**
* Get an existing ConsumerOauth2 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?: ConsumerOauth2State, opts?: pulumi.CustomResourceOptions): ConsumerOauth2;
/**
* Returns true if the given object is an instance of ConsumerOauth2. 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 ConsumerOauth2;
/**
* Unique oauth2 client id. If not set, the oauth2 plugin will generate one
*/
readonly clientId: pulumi.Output<string | undefined>;
/**
* Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
*/
readonly clientSecret: pulumi.Output<string | undefined>;
/**
* The id of the consumer to be configured with oauth2.
*/
readonly consumerId: pulumi.Output<string>;
/**
* A boolean flag that indicates whether the clientSecret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
*/
readonly hashSecret: pulumi.Output<boolean | undefined>;
/**
* The name associated with the credential.
*/
readonly name: pulumi.Output<string>;
/**
* An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
*/
readonly redirectUris: pulumi.Output<string[]>;
/**
* A list of strings associated with the consumer for grouping and filtering.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Create a ConsumerOauth2 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: ConsumerOauth2Args, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ConsumerOauth2 resources.
*/
export interface ConsumerOauth2State {
/**
* Unique oauth2 client id. If not set, the oauth2 plugin will generate one
*/
clientId?: pulumi.Input<string>;
/**
* Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
*/
clientSecret?: pulumi.Input<string>;
/**
* The id of the consumer to be configured with oauth2.
*/
consumerId?: pulumi.Input<string>;
/**
* A boolean flag that indicates whether the clientSecret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
*/
hashSecret?: pulumi.Input<boolean>;
/**
* The name associated with the credential.
*/
name?: pulumi.Input<string>;
/**
* An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
*/
redirectUris?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of strings associated with the consumer for grouping and filtering.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a ConsumerOauth2 resource.
*/
export interface ConsumerOauth2Args {
/**
* Unique oauth2 client id. If not set, the oauth2 plugin will generate one
*/
clientId?: pulumi.Input<string>;
/**
* Unique oauth2 client secret. If not set, the oauth2 plugin will generate one
*/
clientSecret?: pulumi.Input<string>;
/**
* The id of the consumer to be configured with oauth2.
*/
consumerId: pulumi.Input<string>;
/**
* A boolean flag that indicates whether the clientSecret field will be stored in hashed form. If enabled on existing plugin instances, client secrets are hashed on the fly upon first usage. Default: `false`.
*/
hashSecret?: pulumi.Input<boolean>;
/**
* The name associated with the credential.
*/
name?: pulumi.Input<string>;
/**
* An array with one or more URLs in your app where users will be sent after authorization ([RFC 6742 Section 3.1.2](https://tools.ietf.org/html/rfc6749#section-3.1.2)).
*/
redirectUris: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of strings associated with the consumer for grouping and filtering.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}