1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ManagementDashboard
  5. ManagementDashboardsImport
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.ManagementDashboard.ManagementDashboardsImport

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This resource provides the Management Dashboards Import resource in Oracle Cloud Infrastructure Management Dashboard service.

    Imports an array of dashboards and their saved searches. Here’s an example of how you can use CLI to import a dashboard. For information on the details that must be passed to IMPORT, you can use the EXPORT API to obtain the Import.json file: oci management-dashboard dashboard export --query data --export-dashboard-id "{\"dashboardIds\":[\"ocid1.managementdashboard.oc1..dashboardId1\"]}" > Import.json. Note that import API updates the resource if it already exists, and creates a new resource if it does not exist. To import to a different compartment, edit and change the compartmentId to the desired compartment OCID. Here’s an example of how you can use CLI to import: oci management-dashboard dashboard import --from-json file://Import.json

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagementDashboardsImport = new oci.managementdashboard.ManagementDashboardsImport("test_management_dashboards_import", {
        importDetails: sampleImportDetails,
        importDetailsFile: sampleImportDetailsFilePath,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_management_dashboards_import = oci.management_dashboard.ManagementDashboardsImport("test_management_dashboards_import",
        import_details=sample_import_details,
        import_details_file=sample_import_details_file_path)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ManagementDashboard"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ManagementDashboard.NewManagementDashboardsImport(ctx, "test_management_dashboards_import", &ManagementDashboard.ManagementDashboardsImportArgs{
    			ImportDetails:     pulumi.Any(sampleImportDetails),
    			ImportDetailsFile: pulumi.Any(sampleImportDetailsFilePath),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testManagementDashboardsImport = new Oci.ManagementDashboard.ManagementDashboardsImport("test_management_dashboards_import", new()
        {
            ImportDetails = sampleImportDetails,
            ImportDetailsFile = sampleImportDetailsFilePath,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ManagementDashboard.ManagementDashboardsImport;
    import com.pulumi.oci.ManagementDashboard.ManagementDashboardsImportArgs;
    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 testManagementDashboardsImport = new ManagementDashboardsImport("testManagementDashboardsImport", ManagementDashboardsImportArgs.builder()
                .importDetails(sampleImportDetails)
                .importDetailsFile(sampleImportDetailsFilePath)
                .build());
    
        }
    }
    
    resources:
      testManagementDashboardsImport:
        type: oci:ManagementDashboard:ManagementDashboardsImport
        name: test_management_dashboards_import
        properties:
          importDetails: ${sampleImportDetails}
          importDetailsFile: ${sampleImportDetailsFilePath}
    

    Create ManagementDashboardsImport Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ManagementDashboardsImport(name: string, args?: ManagementDashboardsImportArgs, opts?: CustomResourceOptions);
    @overload
    def ManagementDashboardsImport(resource_name: str,
                                   args: Optional[ManagementDashboardsImportArgs] = None,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ManagementDashboardsImport(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   import_details: Optional[str] = None,
                                   import_details_file: Optional[str] = None)
    func NewManagementDashboardsImport(ctx *Context, name string, args *ManagementDashboardsImportArgs, opts ...ResourceOption) (*ManagementDashboardsImport, error)
    public ManagementDashboardsImport(string name, ManagementDashboardsImportArgs? args = null, CustomResourceOptions? opts = null)
    public ManagementDashboardsImport(String name, ManagementDashboardsImportArgs args)
    public ManagementDashboardsImport(String name, ManagementDashboardsImportArgs args, CustomResourceOptions options)
    
    type: oci:ManagementDashboard:ManagementDashboardsImport
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ManagementDashboardsImportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagementDashboardsImportArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagementDashboardsImportArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagementDashboardsImportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagementDashboardsImportArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var managementDashboardsImportResource = new Oci.ManagementDashboard.ManagementDashboardsImport("managementDashboardsImportResource", new()
    {
        ImportDetails = "string",
        ImportDetailsFile = "string",
    });
    
    example, err := ManagementDashboard.NewManagementDashboardsImport(ctx, "managementDashboardsImportResource", &ManagementDashboard.ManagementDashboardsImportArgs{
    	ImportDetails:     pulumi.String("string"),
    	ImportDetailsFile: pulumi.String("string"),
    })
    
    var managementDashboardsImportResource = new ManagementDashboardsImport("managementDashboardsImportResource", ManagementDashboardsImportArgs.builder()
        .importDetails("string")
        .importDetailsFile("string")
        .build());
    
    management_dashboards_import_resource = oci.management_dashboard.ManagementDashboardsImport("managementDashboardsImportResource",
        import_details="string",
        import_details_file="string")
    
    const managementDashboardsImportResource = new oci.managementdashboard.ManagementDashboardsImport("managementDashboardsImportResource", {
        importDetails: "string",
        importDetailsFile: "string",
    });
    
    type: oci:ManagementDashboard:ManagementDashboardsImport
    properties:
        importDetails: string
        importDetailsFile: string
    

    ManagementDashboardsImport Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ManagementDashboardsImport resource accepts the following input properties:

    ImportDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    ImportDetailsFile string
    ImportDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    ImportDetailsFile string
    importDetails String
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile String
    importDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile string
    import_details str
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    import_details_file str
    importDetails String
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagementDashboardsImport resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ManagementDashboardsImport Resource

    Get an existing ManagementDashboardsImport resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagementDashboardsImportState, opts?: CustomResourceOptions): ManagementDashboardsImport
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            import_details: Optional[str] = None,
            import_details_file: Optional[str] = None) -> ManagementDashboardsImport
    func GetManagementDashboardsImport(ctx *Context, name string, id IDInput, state *ManagementDashboardsImportState, opts ...ResourceOption) (*ManagementDashboardsImport, error)
    public static ManagementDashboardsImport Get(string name, Input<string> id, ManagementDashboardsImportState? state, CustomResourceOptions? opts = null)
    public static ManagementDashboardsImport get(String name, Output<String> id, ManagementDashboardsImportState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ImportDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    ImportDetailsFile string
    ImportDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    ImportDetailsFile string
    importDetails String
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile String
    importDetails string
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile string
    import_details str
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    import_details_file str
    importDetails String
    Array of Dashboards to import. The import_details is mandatory if import_details_path is not passed. Value should be stringified JSON of ManagementDashboardImportDetails
    importDetailsFile String

    Import

    ManagementDashboardsImport can be imported using the id, e.g.

    $ pulumi import oci:ManagementDashboard/managementDashboardsImport:ManagementDashboardsImport test_management_dashboards_import "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi