@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
286 lines (285 loc) • 10.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Description
*
* ## Example Usage
*
* ### Apihub Curation Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const apihubCurationBasic = new gcp.apihub.Curation("apihub_curation_basic", {
* location: "us-central1",
* curationId: "test",
* project: "apihub-terraform",
* displayName: "Test Curation",
* description: "This is a sample curation resource managed by Terraform.",
* endpoint: {
* applicationIntegrationEndpointDetails: {
* triggerId: "api_trigger/curation_API_1",
* uri: "https://integrations.googleapis.com/v1/projects/1082615593856/locations/us-central1/integrations/curation:execute",
* },
* },
* });
* ```
*
* ## Import
*
* Curation can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/curations/{{curation_id}}`
*
* * `{{project}}/{{location}}/{{curation_id}}`
*
* * `{{location}}/{{curation_id}}`
*
* When using the `pulumi import` command, Curation can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apihub/curation:Curation default projects/{{project}}/locations/{{location}}/curations/{{curation_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/curation:Curation default {{project}}/{{location}}/{{curation_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/curation:Curation default {{location}}/{{curation_id}}
* ```
*/
export declare class Curation extends pulumi.CustomResource {
/**
* Get an existing Curation 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?: CurationState, opts?: pulumi.CustomResourceOptions): Curation;
/**
* Returns true if the given object is an instance of Curation. 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 Curation;
/**
* The time at which the curation was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* The ID to use for the curation resource, which will become the final
* component of the curations'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 curation resource in the API
* hub.
* * If not provided, a system generated ID will be used.
* This value should be 4-500 characters, and valid characters
* are /a-z[0-9]-_/.
*/
readonly curationId: pulumi.Output<string>;
/**
* The description of the curation.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The display name of the curation.
*/
readonly displayName: pulumi.Output<string>;
/**
* The endpoint to be triggered for curation.
* The endpoint will be invoked with a request payload containing
* ApiMetadata.
* Response should contain curated data in the form of
* ApiMetadata.
* Structure is documented below.
*/
readonly endpoint: pulumi.Output<outputs.apihub.CurationEndpoint>;
/**
* The error code of the last execution of the curation. The error code is
* populated only when the last execution state is failed.
* Possible values:
* ERROR_CODE_UNSPECIFIED
* INTERNAL_ERROR
* UNAUTHORIZED
*/
readonly lastExecutionErrorCode: pulumi.Output<string>;
/**
* Error message describing the failure, if any, during the last execution of
* the curation.
*/
readonly lastExecutionErrorMessage: pulumi.Output<string>;
/**
* The last execution state of the curation.
* Possible values:
* LAST_EXECUTION_STATE_UNSPECIFIED
* SUCCEEDED
* FAILED
*/
readonly lastExecutionState: pulumi.Output<string>;
/**
* 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 curation.
* Format:
* `projects/{project}/locations/{location}/curations/{curation}`
*/
readonly name: pulumi.Output<string>;
/**
* The plugin instances and associated actions that are using the curation.
* Note: A particular curation could be used by multiple plugin instances or
* multiple actions in a plugin instance.
* Structure is documented below.
*/
readonly pluginInstanceActions: pulumi.Output<outputs.apihub.CurationPluginInstanceAction[]>;
/**
* 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>;
/**
* The time at which the curation was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a Curation 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: CurationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Curation resources.
*/
export interface CurationState {
/**
* The time at which the curation was created.
*/
createTime?: pulumi.Input<string>;
/**
* The ID to use for the curation resource, which will become the final
* component of the curations'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 curation resource in the API
* hub.
* * If not provided, a system generated ID will be used.
* This value should be 4-500 characters, and valid characters
* are /a-z[0-9]-_/.
*/
curationId?: pulumi.Input<string>;
/**
* The description of the curation.
*/
description?: pulumi.Input<string>;
/**
* The display name of the curation.
*/
displayName?: pulumi.Input<string>;
/**
* The endpoint to be triggered for curation.
* The endpoint will be invoked with a request payload containing
* ApiMetadata.
* Response should contain curated data in the form of
* ApiMetadata.
* Structure is documented below.
*/
endpoint?: pulumi.Input<inputs.apihub.CurationEndpoint>;
/**
* The error code of the last execution of the curation. The error code is
* populated only when the last execution state is failed.
* Possible values:
* ERROR_CODE_UNSPECIFIED
* INTERNAL_ERROR
* UNAUTHORIZED
*/
lastExecutionErrorCode?: pulumi.Input<string>;
/**
* Error message describing the failure, if any, during the last execution of
* the curation.
*/
lastExecutionErrorMessage?: pulumi.Input<string>;
/**
* The last execution state of the curation.
* Possible values:
* LAST_EXECUTION_STATE_UNSPECIFIED
* SUCCEEDED
* FAILED
*/
lastExecutionState?: pulumi.Input<string>;
/**
* 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 curation.
* Format:
* `projects/{project}/locations/{location}/curations/{curation}`
*/
name?: pulumi.Input<string>;
/**
* The plugin instances and associated actions that are using the curation.
* Note: A particular curation could be used by multiple plugin instances or
* multiple actions in a plugin instance.
* Structure is documented below.
*/
pluginInstanceActions?: pulumi.Input<pulumi.Input<inputs.apihub.CurationPluginInstanceAction>[]>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The time at which the curation was last updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Curation resource.
*/
export interface CurationArgs {
/**
* The ID to use for the curation resource, which will become the final
* component of the curations'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 curation resource in the API
* hub.
* * If not provided, a system generated ID will be used.
* This value should be 4-500 characters, and valid characters
* are /a-z[0-9]-_/.
*/
curationId: pulumi.Input<string>;
/**
* The description of the curation.
*/
description?: pulumi.Input<string>;
/**
* The display name of the curation.
*/
displayName: pulumi.Input<string>;
/**
* The endpoint to be triggered for curation.
* The endpoint will be invoked with a request payload containing
* ApiMetadata.
* Response should contain curated data in the form of
* ApiMetadata.
* Structure is documented below.
*/
endpoint: pulumi.Input<inputs.apihub.CurationEndpoint>;
/**
* 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>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}