@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
300 lines (299 loc) • 11.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* An ApiHubInstance represents the instance resources of the API Hub.
* Currently, only one ApiHub instance is allowed for each project.
* Currently, updation/deletion of ApiHub instance is not allowed.
*
* ## Example Usage
*
* ### Apihub Api Hub Instance Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const apihub_instance_without_search = new gcp.apihub.ApiHubInstance("apihub-instance-without-search", {
* location: "us-central1",
* config: {
* disableSearch: true,
* },
* });
* ```
* ### Apihub Api Hub Instance Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const apihub_instance_search = new gcp.apihub.ApiHubInstance("apihub-instance-search", {
* project: "my-project",
* apiHubInstanceId: "test-instance-full",
* description: "Test API hub instance",
* location: "us-central1",
* config: {
* encryptionType: "CMEK",
* cmekKeyName: "projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key",
* disableSearch: false,
* vertexLocation: "us",
* },
* labels: {
* environment: "dev",
* },
* });
* ```
*
* ## Import
*
* ApiHubInstance can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/apiHubInstances/{{api_hub_instance_id}}`
*
* * `{{project}}/{{location}}/{{api_hub_instance_id}}`
*
* * `{{location}}/{{api_hub_instance_id}}`
*
* When using the `pulumi import` command, ApiHubInstance can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default projects/{{project}}/locations/{{location}}/apiHubInstances/{{api_hub_instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default {{project}}/{{location}}/{{api_hub_instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default {{location}}/{{api_hub_instance_id}}
* ```
*/
export declare class ApiHubInstance extends pulumi.CustomResource {
/**
* Get an existing ApiHubInstance 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?: ApiHubInstanceState, opts?: pulumi.CustomResourceOptions): ApiHubInstance;
/**
* Returns true if the given object is an instance of ApiHubInstance. 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 ApiHubInstance;
/**
* Optional. Identifier to assign to the Api Hub instance. Must be unique within
* scope of the parent resource. If the field is not provided,
* system generated id will be used.
* This value should be 4-40 characters, and valid characters
* are `/a-z[0-9]-_/`.
*/
readonly apiHubInstanceId: pulumi.Output<string | undefined>;
/**
* Available configurations to provision an ApiHub Instance.
* Structure is documented below.
*/
readonly config: pulumi.Output<outputs.apihub.ApiHubInstanceConfig>;
/**
* Output only. Creation timestamp.
*/
readonly createTime: pulumi.Output<string>;
/**
* Optional. Description of the ApiHub instance.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Optional. Instance labels to represent user-provided metadata.
* Refer to cloud documentation on labels for more details.
* https://cloud.google.com/compute/docs/labeling-resources
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | 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. Format:
* `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
*/
readonly name: 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>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Output only. The current state of the ApiHub instance.
* Possible values:
* STATE_UNSPECIFIED
* INACTIVE
* CREATING
* ACTIVE
* UPDATING
* DELETING
* FAILED
*/
readonly state: pulumi.Output<string>;
/**
* Output only. Extra information about ApiHub instance state. Currently the message
* would be populated when state is `FAILED`.
*/
readonly stateMessage: pulumi.Output<string>;
/**
* Output only. Last update timestamp.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a ApiHubInstance 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: ApiHubInstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ApiHubInstance resources.
*/
export interface ApiHubInstanceState {
/**
* Optional. Identifier to assign to the Api Hub instance. Must be unique within
* scope of the parent resource. If the field is not provided,
* system generated id will be used.
* This value should be 4-40 characters, and valid characters
* are `/a-z[0-9]-_/`.
*/
apiHubInstanceId?: pulumi.Input<string>;
/**
* Available configurations to provision an ApiHub Instance.
* Structure is documented below.
*/
config?: pulumi.Input<inputs.apihub.ApiHubInstanceConfig>;
/**
* Output only. Creation timestamp.
*/
createTime?: pulumi.Input<string>;
/**
* Optional. Description of the ApiHub instance.
*/
description?: pulumi.Input<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Optional. Instance labels to represent user-provided metadata.
* Refer to cloud documentation on labels for more details.
* https://cloud.google.com/compute/docs/labeling-resources
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: 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. Format:
* `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`.
*/
name?: 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>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Output only. The current state of the ApiHub instance.
* Possible values:
* STATE_UNSPECIFIED
* INACTIVE
* CREATING
* ACTIVE
* UPDATING
* DELETING
* FAILED
*/
state?: pulumi.Input<string>;
/**
* Output only. Extra information about ApiHub instance state. Currently the message
* would be populated when state is `FAILED`.
*/
stateMessage?: pulumi.Input<string>;
/**
* Output only. Last update timestamp.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ApiHubInstance resource.
*/
export interface ApiHubInstanceArgs {
/**
* Optional. Identifier to assign to the Api Hub instance. Must be unique within
* scope of the parent resource. If the field is not provided,
* system generated id will be used.
* This value should be 4-40 characters, and valid characters
* are `/a-z[0-9]-_/`.
*/
apiHubInstanceId?: pulumi.Input<string>;
/**
* Available configurations to provision an ApiHub Instance.
* Structure is documented below.
*/
config: pulumi.Input<inputs.apihub.ApiHubInstanceConfig>;
/**
* Optional. Description of the ApiHub instance.
*/
description?: pulumi.Input<string>;
/**
* Optional. Instance labels to represent user-provided metadata.
* Refer to cloud documentation on labels for more details.
* https://cloud.google.com/compute/docs/labeling-resources
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: 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>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}