@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
395 lines (394 loc) • 14.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A plugin resource in the API hub.
*
* ## Example Usage
*
* ### Apihub Plugin Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const apihubPluginFull = new gcp.apihub.Plugin("apihub_plugin_full", {
* location: "us-central1",
* displayName: "Test Plugin",
* description: "Test description",
* pluginId: "plugin-full",
* pluginCategory: "API_GATEWAY",
* actionsConfigs: [{
* id: "sync-metadata",
* displayName: "Sync Metadata",
* description: "Syncs API metadata.",
* triggerMode: "API_HUB_SCHEDULE_TRIGGER",
* }],
* documentation: {
* externalUri: "https://example.com/plugin-documentation",
* },
* hostingService: {
* serviceUri: "https://your-plugin-service.example.com/api",
* },
* configTemplate: {
* authConfigTemplate: {
* supportedAuthTypes: [
* "NO_AUTH",
* "USER_PASSWORD",
* ],
* serviceAccount: {
* serviceAccount: "test@developer.gserviceaccount.com",
* },
* },
* additionalConfigTemplates: [
* {
* id: "string-val",
* description: "API key for the service.",
* valueType: "STRING",
* required: false,
* validationRegex: "^[a-zA-Z0-9]{5,20}$",
* },
* {
* id: "integer-val",
* description: "API key for the service.",
* valueType: "INT",
* required: true,
* validationRegex: "",
* },
* {
* id: "bool-val",
* description: "API key for the service.",
* valueType: "BOOL",
* required: false,
* validationRegex: "",
* },
* {
* id: "enum-val",
* description: "API key for the service.",
* valueType: "ENUM",
* enumOptions: [
* {
* id: "Option1",
* displayName: "Option1",
* description: "Description for Option1",
* },
* {
* id: "Option2",
* displayName: "Option2",
* description: "Description for Option2",
* },
* ],
* required: false,
* validationRegex: "",
* },
* ],
* },
* });
* ```
*
* ## Import
*
* Plugin can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/plugins/{{plugin_id}}`
*
* * `{{project}}/{{location}}/{{plugin_id}}`
*
* * `{{location}}/{{plugin_id}}`
*
* When using the `pulumi import` command, Plugin can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apihub/plugin:Plugin default projects/{{project}}/locations/{{location}}/plugins/{{plugin_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/plugin:Plugin default {{project}}/{{location}}/{{plugin_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/plugin:Plugin default {{location}}/{{plugin_id}}
* ```
*/
export declare class Plugin extends pulumi.CustomResource {
/**
* Get an existing Plugin 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?: PluginState, opts?: pulumi.CustomResourceOptions): Plugin;
/**
* Returns true if the given object is an instance of Plugin. 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 Plugin;
/**
* The configuration of actions supported by the plugin.
* Structure is documented below.
*/
readonly actionsConfigs: pulumi.Output<outputs.apihub.PluginActionsConfig[] | undefined>;
/**
* ConfigTemplate represents the configuration template for a plugin.
* Structure is documented below.
*/
readonly configTemplate: pulumi.Output<outputs.apihub.PluginConfigTemplate | undefined>;
/**
* Timestamp indicating when the plugin was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* The plugin description. Max length is 2000 characters (Unicode code
* points).
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The display name of the plugin. Max length is 50 characters (Unicode code
* points).
*/
readonly displayName: pulumi.Output<string>;
/**
* Documentation details.
* Structure is documented below.
*/
readonly documentation: pulumi.Output<outputs.apihub.PluginDocumentation | undefined>;
/**
* The information related to the service implemented by the plugin
* developer, used to invoke the plugin's functionality.
* Structure is documented below.
*/
readonly hostingService: pulumi.Output<outputs.apihub.PluginHostingService | undefined>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
readonly location: pulumi.Output<string>;
/**
* Identifier. The name of the plugin.
* Format: `projects/{project}/locations/{location}/plugins/{plugin}`
*/
readonly name: pulumi.Output<string>;
/**
* The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or
* 'USER_OWNED'.
* Possible values:
* OWNERSHIP_TYPE_UNSPECIFIED
* SYSTEM_OWNED
* USER_OWNED
*/
readonly ownershipType: pulumi.Output<string>;
/**
* Possible values:
* PLUGIN_CATEGORY_UNSPECIFIED
* API_GATEWAY
* API_PRODUCER
*/
readonly pluginCategory: pulumi.Output<string | undefined>;
/**
* The ID to use for the Plugin resource, which will become the final
* component of the Plugin's resource name. This field is optional.
* * If provided, the same will be used. The service will throw an error if
* the specified id is already used by another Plugin resource in the API hub
* instance.
* * If not provided, a system generated id will be used.
* This value should be 4-63 characters, overall resource name which will be
* of format
* `projects/{project}/locations/{location}/plugins/{plugin}`,
* its length is limited to 1000 characters and valid characters are
* /a-z[0-9]-_/.
*/
readonly pluginId: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Represents the state of the plugin.
* Note this field will not be set for plugins developed via plugin
* framework as the state will be managed at plugin instance level.
* Possible values:
* STATE_UNSPECIFIED
* ENABLED
* DISABLED
*/
readonly state: pulumi.Output<string>;
/**
* Timestamp indicating when the plugin was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a Plugin 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: PluginArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Plugin resources.
*/
export interface PluginState {
/**
* The configuration of actions supported by the plugin.
* Structure is documented below.
*/
actionsConfigs?: pulumi.Input<pulumi.Input<inputs.apihub.PluginActionsConfig>[]>;
/**
* ConfigTemplate represents the configuration template for a plugin.
* Structure is documented below.
*/
configTemplate?: pulumi.Input<inputs.apihub.PluginConfigTemplate>;
/**
* Timestamp indicating when the plugin was created.
*/
createTime?: pulumi.Input<string>;
/**
* The plugin description. Max length is 2000 characters (Unicode code
* points).
*/
description?: pulumi.Input<string>;
/**
* The display name of the plugin. Max length is 50 characters (Unicode code
* points).
*/
displayName?: pulumi.Input<string>;
/**
* Documentation details.
* Structure is documented below.
*/
documentation?: pulumi.Input<inputs.apihub.PluginDocumentation>;
/**
* The information related to the service implemented by the plugin
* developer, used to invoke the plugin's functionality.
* Structure is documented below.
*/
hostingService?: pulumi.Input<inputs.apihub.PluginHostingService>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location?: pulumi.Input<string>;
/**
* Identifier. The name of the plugin.
* Format: `projects/{project}/locations/{location}/plugins/{plugin}`
*/
name?: pulumi.Input<string>;
/**
* The type of the plugin, indicating whether it is 'SYSTEM_OWNED' or
* 'USER_OWNED'.
* Possible values:
* OWNERSHIP_TYPE_UNSPECIFIED
* SYSTEM_OWNED
* USER_OWNED
*/
ownershipType?: pulumi.Input<string>;
/**
* Possible values:
* PLUGIN_CATEGORY_UNSPECIFIED
* API_GATEWAY
* API_PRODUCER
*/
pluginCategory?: pulumi.Input<string>;
/**
* The ID to use for the Plugin resource, which will become the final
* component of the Plugin's resource name. This field is optional.
* * If provided, the same will be used. The service will throw an error if
* the specified id is already used by another Plugin resource in the API hub
* instance.
* * If not provided, a system generated id will be used.
* This value should be 4-63 characters, overall resource name which will be
* of format
* `projects/{project}/locations/{location}/plugins/{plugin}`,
* its length is limited to 1000 characters and valid characters are
* /a-z[0-9]-_/.
*/
pluginId?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Represents the state of the plugin.
* Note this field will not be set for plugins developed via plugin
* framework as the state will be managed at plugin instance level.
* Possible values:
* STATE_UNSPECIFIED
* ENABLED
* DISABLED
*/
state?: pulumi.Input<string>;
/**
* Timestamp indicating when the plugin was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Plugin resource.
*/
export interface PluginArgs {
/**
* The configuration of actions supported by the plugin.
* Structure is documented below.
*/
actionsConfigs?: pulumi.Input<pulumi.Input<inputs.apihub.PluginActionsConfig>[]>;
/**
* ConfigTemplate represents the configuration template for a plugin.
* Structure is documented below.
*/
configTemplate?: pulumi.Input<inputs.apihub.PluginConfigTemplate>;
/**
* The plugin description. Max length is 2000 characters (Unicode code
* points).
*/
description?: pulumi.Input<string>;
/**
* The display name of the plugin. Max length is 50 characters (Unicode code
* points).
*/
displayName: pulumi.Input<string>;
/**
* Documentation details.
* Structure is documented below.
*/
documentation?: pulumi.Input<inputs.apihub.PluginDocumentation>;
/**
* The information related to the service implemented by the plugin
* developer, used to invoke the plugin's functionality.
* Structure is documented below.
*/
hostingService?: pulumi.Input<inputs.apihub.PluginHostingService>;
/**
* Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
*/
location: pulumi.Input<string>;
/**
* Possible values:
* PLUGIN_CATEGORY_UNSPECIFIED
* API_GATEWAY
* API_PRODUCER
*/
pluginCategory?: pulumi.Input<string>;
/**
* The ID to use for the Plugin resource, which will become the final
* component of the Plugin's resource name. This field is optional.
* * If provided, the same will be used. The service will throw an error if
* the specified id is already used by another Plugin resource in the API hub
* instance.
* * If not provided, a system generated id will be used.
* This value should be 4-63 characters, overall resource name which will be
* of format
* `projects/{project}/locations/{location}/plugins/{plugin}`,
* its length is limited to 1000 characters and valid characters are
* /a-z[0-9]-_/.
*/
pluginId: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}