UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

396 lines • 15.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * DiscoveryClient represents an on-premise discovery agent that scans infrastructure and uploads discovery data to Migration Center. * * ## Example Usage * * ### Migration Center Discovery Client Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.migrationcenter.Source("default", { * location: "us-central1", * sourceId: "source-test", * type: "SOURCE_TYPE_DISCOVERY_CLIENT", * }); * const defaultAccount = new gcp.serviceaccount.Account("default", { * accountId: "sa-test", * displayName: "Service Account for Discovery Client", * }); * const default2 = new gcp.serviceaccount.Account("default_2", { * accountId: "sa-test-two", * displayName: "Second Service Account for Discovery Client", * }); * const defaultDiscoveryClient = new gcp.migrationcenter.DiscoveryClient("default", { * location: "us-central1", * discoveryClientId: "discovery-client-test", * source: _default.id, * serviceAccount: defaultAccount.email, * displayName: "Terraform integration test display", * description: "Terraform integration test description", * ttl: "86400s", * labels: { * my_key: "value", * second_key: "second_value", * }, * }); * ``` * * ## Import * * DiscoveryClient can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/discoveryClients/{{discovery_client_id}}` * * `{{project}}/{{location}}/{{discovery_client_id}}` * * `{{location}}/{{discovery_client_id}}` * * When using the `pulumi import` command, DiscoveryClient can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:migrationcenter/discoveryClient:DiscoveryClient default projects/{{project}}/locations/{{location}}/discoveryClients/{{discovery_client_id}} * $ pulumi import gcp:migrationcenter/discoveryClient:DiscoveryClient default {{project}}/{{location}}/{{discovery_client_id}} * $ pulumi import gcp:migrationcenter/discoveryClient:DiscoveryClient default {{location}}/{{discovery_client_id}} * ``` */ export declare class DiscoveryClient extends pulumi.CustomResource { /** * Get an existing DiscoveryClient 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?: DiscoveryClientState, opts?: pulumi.CustomResourceOptions): DiscoveryClient; /** * Returns true if the given object is an instance of DiscoveryClient. 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 DiscoveryClient; /** * Time when the discovery client was first created. */ readonly createTime: pulumi.Output<string>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ readonly deletionPolicy: pulumi.Output<string>; /** * Free text description. * Maximum length is 1000 characters. */ readonly description: pulumi.Output<string | undefined>; /** * User specified ID for the discovery client. It will become the last * component of the discovery client name. The ID must be unique within the * project, is restricted to lower-cased letters and has a maximum length of * 63 characters. The ID must match the regular expression: * `a-z?`. */ readonly discoveryClientId: pulumi.Output<string>; /** * Free text display name. * Maximum length is 63 characters. */ readonly displayName: 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; }>; /** * Errors affecting client functionality. * Structure is documented below. */ readonly errors: pulumi.Output<outputs.migrationcenter.DiscoveryClientError[]>; /** * Client expiration time in UTC. If specified, the backend will not accept * new frames after this time. */ readonly expireTime: pulumi.Output<string>; /** * Last heartbeat time. * Healthy clients are expected to send heartbeats regularly (normally every * few minutes). */ readonly heartbeatTime: pulumi.Output<string>; /** * Labels as key value pairs. * **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. Full name of this discovery client. */ 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; }>; /** * Service account used by the discovery client for various operation. */ readonly serviceAccount: pulumi.Output<string>; /** * This field is intended for internal use. */ readonly signalsEndpoint: pulumi.Output<string>; /** * Full name of the source object associated with this discovery client. */ readonly source: pulumi.Output<string>; /** * Current state of the discovery client. * Possible values: * ACTIVE * OFFLINE * DEGRADED * EXPIRED */ readonly state: pulumi.Output<string>; /** * Input only. Client time-to-live. If specified, the backend will not accept new * frames after this time. * This field is input only. The derived expiration time is provided as * output through the `expireTime` field. */ readonly ttl: pulumi.Output<string | undefined>; /** * Time when the discovery client was last updated. This value is not updated * by heartbeats, to view the last heartbeat time please refer to the * `heartbeatTime` field. */ readonly updateTime: pulumi.Output<string>; /** * Client version, as reported in recent heartbeat. */ readonly version: pulumi.Output<string>; /** * Create a DiscoveryClient 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: DiscoveryClientArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DiscoveryClient resources. */ export interface DiscoveryClientState { /** * Time when the discovery client was first created. */ createTime?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * Free text description. * Maximum length is 1000 characters. */ description?: pulumi.Input<string | undefined>; /** * User specified ID for the discovery client. It will become the last * component of the discovery client name. The ID must be unique within the * project, is restricted to lower-cased letters and has a maximum length of * 63 characters. The ID must match the regular expression: * `a-z?`. */ discoveryClientId?: pulumi.Input<string | undefined>; /** * Free text display name. * Maximum length is 63 characters. */ displayName?: pulumi.Input<string | undefined>; /** * 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>; } | undefined>; /** * Errors affecting client functionality. * Structure is documented below. */ errors?: pulumi.Input<pulumi.Input<inputs.migrationcenter.DiscoveryClientError>[] | undefined>; /** * Client expiration time in UTC. If specified, the backend will not accept * new frames after this time. */ expireTime?: pulumi.Input<string | undefined>; /** * Last heartbeat time. * Healthy clients are expected to send heartbeats regularly (normally every * few minutes). */ heartbeatTime?: pulumi.Input<string | undefined>; /** * Labels as key value pairs. * **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>; } | undefined>; /** * 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 | undefined>; /** * Identifier. Full name of this discovery client. */ name?: pulumi.Input<string | undefined>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string | undefined>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; } | undefined>; /** * Service account used by the discovery client for various operation. */ serviceAccount?: pulumi.Input<string | undefined>; /** * This field is intended for internal use. */ signalsEndpoint?: pulumi.Input<string | undefined>; /** * Full name of the source object associated with this discovery client. */ source?: pulumi.Input<string | undefined>; /** * Current state of the discovery client. * Possible values: * ACTIVE * OFFLINE * DEGRADED * EXPIRED */ state?: pulumi.Input<string | undefined>; /** * Input only. Client time-to-live. If specified, the backend will not accept new * frames after this time. * This field is input only. The derived expiration time is provided as * output through the `expireTime` field. */ ttl?: pulumi.Input<string | undefined>; /** * Time when the discovery client was last updated. This value is not updated * by heartbeats, to view the last heartbeat time please refer to the * `heartbeatTime` field. */ updateTime?: pulumi.Input<string | undefined>; /** * Client version, as reported in recent heartbeat. */ version?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a DiscoveryClient resource. */ export interface DiscoveryClientArgs { /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * Free text description. * Maximum length is 1000 characters. */ description?: pulumi.Input<string | undefined>; /** * User specified ID for the discovery client. It will become the last * component of the discovery client name. The ID must be unique within the * project, is restricted to lower-cased letters and has a maximum length of * 63 characters. The ID must match the regular expression: * `a-z?`. */ discoveryClientId: pulumi.Input<string>; /** * Free text display name. * Maximum length is 63 characters. */ displayName?: pulumi.Input<string | undefined>; /** * Client expiration time in UTC. If specified, the backend will not accept * new frames after this time. */ expireTime?: pulumi.Input<string | undefined>; /** * Labels as key value pairs. * **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>; } | undefined>; /** * 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 | undefined>; /** * Service account used by the discovery client for various operation. */ serviceAccount: pulumi.Input<string>; /** * Full name of the source object associated with this discovery client. */ source: pulumi.Input<string>; /** * Input only. Client time-to-live. If specified, the backend will not accept new * frames after this time. * This field is input only. The derived expiration time is provided as * output through the `expireTime` field. */ ttl?: pulumi.Input<string | undefined>; } //# sourceMappingURL=discoveryClient.d.ts.map