// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.monitoring;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.monitoring.MonitoredProjectArgs;
import com.pulumi.gcp.monitoring.inputs.MonitoredProjectState;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * A [project being monitored](https://cloud.google.com/monitoring/settings/multiple-projects#create-multi) by a Metrics Scope.
 * 
 * To get more information about MonitoredProject, see:
 * 
 * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v1/locations.global.metricsScopes.projects)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/monitoring/settings/manage-api)
 * 
 * ## Example Usage
 * ### Monitoring Monitored Project Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.monitoring.MonitoredProject;
 * import com.pulumi.gcp.monitoring.MonitoredProjectArgs;
 * import com.pulumi.gcp.organizations.Project;
 * import com.pulumi.gcp.organizations.ProjectArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var primary = new MonitoredProject(&#34;primary&#34;, MonitoredProjectArgs.builder()        
 *             .metricsScope(&#34;my-project-name&#34;)
 *             .build());
 * 
 *         var basic = new Project(&#34;basic&#34;, ProjectArgs.builder()        
 *             .projectId(&#34;m-id&#34;)
 *             .orgId(&#34;123456789&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * MonitoredProject can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:monitoring/monitoredProject:MonitoredProject default v1/locations/global/metricsScopes/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:monitoring/monitoredProject:MonitoredProject default {{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:monitoring/monitoredProject:MonitoredProject")
public class MonitoredProject extends com.pulumi.resources.CustomResource {
    /**
     * Output only. The time when this `MonitoredProject` was created.
     * 
     */
    @Export(name="createTime", type=String.class, parameters={})
    private Output<String> createTime;

    /**
     * @return Output only. The time when this `MonitoredProject` was created.
     * 
     */
    public Output<String> createTime() {
        return this.createTime;
    }
    /**
     * Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}
     * 
     * ***
     * 
     */
    @Export(name="metricsScope", type=String.class, parameters={})
    private Output<String> metricsScope;

    /**
     * @return Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}
     * 
     * ***
     * 
     */
    public Output<String> metricsScope() {
        return this.metricsScope;
    }
    /**
     * Immutable. The resource name of the `MonitoredProject`. On input, the resource name includes the scoping project ID and monitored project ID. On output, it contains the equivalent project numbers. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Immutable. The resource name of the `MonitoredProject`. On input, the resource name includes the scoping project ID and monitored project ID. On output, it contains the equivalent project numbers. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public MonitoredProject(String name) {
        this(name, MonitoredProjectArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public MonitoredProject(String name, MonitoredProjectArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public MonitoredProject(String name, MonitoredProjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:monitoring/monitoredProject:MonitoredProject", name, args == null ? MonitoredProjectArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private MonitoredProject(String name, Output<String> id, @Nullable MonitoredProjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:monitoring/monitoredProject:MonitoredProject", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static MonitoredProject get(String name, Output<String> id, @Nullable MonitoredProjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new MonitoredProject(name, id, state, options);
    }
}
