import * as pulumi from "@pulumi/pulumi"; /** * An individual service. A service contains a name and optional metadata. * * To get more information about Service, see: * * * [API documentation](https://cloud.google.com/service-directory/docs/reference/rest/v1/projects.locations.namespaces.services) * * How-to Guides * * [Configuring a service](https://cloud.google.com/service-directory/docs/configuring-service-directory#configuring_a_service) * * ## Example Usage * * ### Service Directory Service Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example = new gcp.servicedirectory.Namespace("example", { * namespaceId: "example-namespace", * location: "us-central1", * }); * const exampleService = new gcp.servicedirectory.Service("example", { * serviceId: "example-service", * namespace: example.id, * metadata: { * stage: "prod", * region: "us-central1", * }, * }); * ``` * * ## Import * * Service can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}` * * `{{project}}/{{location}}/{{namespace_id}}/{{service_id}}` * * `{{location}}/{{namespace_id}}/{{service_id}}` * * When using the `pulumi import` command, Service can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:servicedirectory/service:Service default projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}} * $ pulumi import gcp:servicedirectory/service:Service default {{project}}/{{location}}/{{namespace_id}}/{{service_id}} * $ pulumi import gcp:servicedirectory/service:Service default {{location}}/{{namespace_id}}/{{service_id}} * ``` */ export declare class Service extends pulumi.CustomResource { /** * Get an existing Service 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, state?: ServiceState, opts?: pulumi.CustomResourceOptions): Service; /** * Returns true if the given object is an instance of Service. 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 Service; /** * Metadata for the service. This data can be consumed * by service clients. The entire metadata dictionary may contain * up to 2000 characters, spread across all key-value pairs. * Metadata that goes beyond any these limits will be rejected. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The resource name for the service in the * format `projects/*/locations/*/namespaces/*/services/*`. */ readonly name: pulumi.Output; /** * The resource name of the namespace this service will belong to. */ readonly namespace: pulumi.Output; /** * The Resource ID must be 1-63 characters long, including digits, * lowercase letters or the hyphen character. */ readonly serviceId: pulumi.Output; /** * Create a Service 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: ServiceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Service resources. */ export interface ServiceState { /** * Metadata for the service. This data can be consumed * by service clients. The entire metadata dictionary may contain * up to 2000 characters, spread across all key-value pairs. * Metadata that goes beyond any these limits will be rejected. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The resource name for the service in the * format `projects/*/locations/*/namespaces/*/services/*`. */ name?: pulumi.Input; /** * The resource name of the namespace this service will belong to. */ namespace?: pulumi.Input; /** * The Resource ID must be 1-63 characters long, including digits, * lowercase letters or the hyphen character. */ serviceId?: pulumi.Input; } /** * The set of arguments for constructing a Service resource. */ export interface ServiceArgs { /** * Metadata for the service. This data can be consumed * by service clients. The entire metadata dictionary may contain * up to 2000 characters, spread across all key-value pairs. * Metadata that goes beyond any these limits will be rejected. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The resource name of the namespace this service will belong to. */ namespace: pulumi.Input; /** * The Resource ID must be 1-63 characters long, including digits, * lowercase letters or the hyphen character. */ serviceId: pulumi.Input; }