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

oci.Logging.LogSavedSearch

Explore with Pulumi AI

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

    This resource provides the Log Saved Search resource in Oracle Cloud Infrastructure Logging service.

    Creates a new LogSavedSearch.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLogSavedSearch = new oci.logging.LogSavedSearch("test_log_saved_search", {
        compartmentId: compartmentId,
        name: logSavedSearchName,
        query: logSavedSearchQuery,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: logSavedSearchDescription,
        freeformTags: {
            Department: "Finance",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_log_saved_search = oci.logging.LogSavedSearch("test_log_saved_search",
        compartment_id=compartment_id,
        name=log_saved_search_name,
        query=log_saved_search_query,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=log_saved_search_description,
        freeform_tags={
            "Department": "Finance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Logging"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Logging.NewLogSavedSearch(ctx, "test_log_saved_search", &Logging.LogSavedSearchArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			Name:          pulumi.Any(logSavedSearchName),
    			Query:         pulumi.Any(logSavedSearchQuery),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			Description: pulumi.Any(logSavedSearchDescription),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    		})
    		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 testLogSavedSearch = new Oci.Logging.LogSavedSearch("test_log_saved_search", new()
        {
            CompartmentId = compartmentId,
            Name = logSavedSearchName,
            Query = logSavedSearchQuery,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = logSavedSearchDescription,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Logging.LogSavedSearch;
    import com.pulumi.oci.Logging.LogSavedSearchArgs;
    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 testLogSavedSearch = new LogSavedSearch("testLogSavedSearch", LogSavedSearchArgs.builder()
                .compartmentId(compartmentId)
                .name(logSavedSearchName)
                .query(logSavedSearchQuery)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(logSavedSearchDescription)
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testLogSavedSearch:
        type: oci:Logging:LogSavedSearch
        name: test_log_saved_search
        properties:
          compartmentId: ${compartmentId}
          name: ${logSavedSearchName}
          query: ${logSavedSearchQuery}
          definedTags:
            Operations.CostCenter: '42'
          description: ${logSavedSearchDescription}
          freeformTags:
            Department: Finance
    

    Create LogSavedSearch Resource

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

    Constructor syntax

    new LogSavedSearch(name: string, args: LogSavedSearchArgs, opts?: CustomResourceOptions);
    @overload
    def LogSavedSearch(resource_name: str,
                       args: LogSavedSearchArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogSavedSearch(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       query: Optional[str] = None,
                       defined_tags: Optional[Mapping[str, Any]] = None,
                       description: Optional[str] = None,
                       freeform_tags: Optional[Mapping[str, Any]] = None,
                       name: Optional[str] = None)
    func NewLogSavedSearch(ctx *Context, name string, args LogSavedSearchArgs, opts ...ResourceOption) (*LogSavedSearch, error)
    public LogSavedSearch(string name, LogSavedSearchArgs args, CustomResourceOptions? opts = null)
    public LogSavedSearch(String name, LogSavedSearchArgs args)
    public LogSavedSearch(String name, LogSavedSearchArgs args, CustomResourceOptions options)
    
    type: oci:Logging:LogSavedSearch
    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 LogSavedSearchArgs
    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 LogSavedSearchArgs
    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 LogSavedSearchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogSavedSearchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogSavedSearchArgs
    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 logSavedSearchResource = new Oci.Logging.LogSavedSearch("logSavedSearchResource", new()
    {
        CompartmentId = "string",
        Query = "string",
        DefinedTags = 
        {
            { "string", "any" },
        },
        Description = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        Name = "string",
    });
    
    example, err := Logging.NewLogSavedSearch(ctx, "logSavedSearchResource", &Logging.LogSavedSearchArgs{
    	CompartmentId: pulumi.String("string"),
    	Query:         pulumi.String("string"),
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Description: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var logSavedSearchResource = new LogSavedSearch("logSavedSearchResource", LogSavedSearchArgs.builder()
        .compartmentId("string")
        .query("string")
        .definedTags(Map.of("string", "any"))
        .description("string")
        .freeformTags(Map.of("string", "any"))
        .name("string")
        .build());
    
    log_saved_search_resource = oci.logging.LogSavedSearch("logSavedSearchResource",
        compartment_id="string",
        query="string",
        defined_tags={
            "string": "any",
        },
        description="string",
        freeform_tags={
            "string": "any",
        },
        name="string")
    
    const logSavedSearchResource = new oci.logging.LogSavedSearch("logSavedSearchResource", {
        compartmentId: "string",
        query: "string",
        definedTags: {
            string: "any",
        },
        description: "string",
        freeformTags: {
            string: "any",
        },
        name: "string",
    });
    
    type: oci:Logging:LogSavedSearch
    properties:
        compartmentId: string
        definedTags:
            string: any
        description: string
        freeformTags:
            string: any
        name: string
        query: string
    

    LogSavedSearch 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 LogSavedSearch resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    Query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) Description for this resource.
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    CompartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    Query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) Description for this resource.
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    compartmentId String
    (Updatable) The OCID of the compartment that the resource belongs to.
    query String

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) Description for this resource.
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    compartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) Description for this resource.
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    compartment_id str
    (Updatable) The OCID of the compartment that the resource belongs to.
    query str

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) Description for this resource.
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name str
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    compartmentId String
    (Updatable) The OCID of the compartment that the resource belongs to.
    query String

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) Description for this resource.
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the LogSavedSearch
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the LogSavedSearch
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the LogSavedSearch
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The state of the LogSavedSearch
    timeCreated string
    Time the resource was created.
    timeLastModified string
    Time the resource was last modified.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The state of the LogSavedSearch
    time_created str
    Time the resource was created.
    time_last_modified str
    Time the resource was last modified.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the LogSavedSearch
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.

    Look up Existing LogSavedSearch Resource

    Get an existing LogSavedSearch 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?: LogSavedSearchState, opts?: CustomResourceOptions): LogSavedSearch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            description: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            name: Optional[str] = None,
            query: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None,
            time_last_modified: Optional[str] = None) -> LogSavedSearch
    func GetLogSavedSearch(ctx *Context, name string, id IDInput, state *LogSavedSearchState, opts ...ResourceOption) (*LogSavedSearch, error)
    public static LogSavedSearch Get(string name, Input<string> id, LogSavedSearchState? state, CustomResourceOptions? opts = null)
    public static LogSavedSearch get(String name, Output<String> id, LogSavedSearchState 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:
    CompartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) Description for this resource.
    FreeformTags Dictionary<string, object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    Query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The state of the LogSavedSearch
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    CompartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) Description for this resource.
    FreeformTags map[string]interface{}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    Query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The state of the LogSavedSearch
    TimeCreated string
    Time the resource was created.
    TimeLastModified string
    Time the resource was last modified.
    compartmentId String
    (Updatable) The OCID of the compartment that the resource belongs to.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) Description for this resource.
    freeformTags Map<String,Object>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    query String

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The state of the LogSavedSearch
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.
    compartmentId string
    (Updatable) The OCID of the compartment that the resource belongs to.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) Description for this resource.
    freeformTags {[key: string]: any}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name string
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    query string

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state string
    The state of the LogSavedSearch
    timeCreated string
    Time the resource was created.
    timeLastModified string
    Time the resource was last modified.
    compartment_id str
    (Updatable) The OCID of the compartment that the resource belongs to.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) Description for this resource.
    freeform_tags Mapping[str, Any]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name str
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    query str

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state str
    The state of the LogSavedSearch
    time_created str
    Time the resource was created.
    time_last_modified str
    Time the resource was last modified.
    compartmentId String
    (Updatable) The OCID of the compartment that the resource belongs to.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) Description for this resource.
    freeformTags Map<Any>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    name String
    (Updatable) The user-friendly display name. This must be unique within the enclosing resource, and it's changeable. Avoid entering confidential information.
    query String

    (Updatable) The search query that is saved.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The state of the LogSavedSearch
    timeCreated String
    Time the resource was created.
    timeLastModified String
    Time the resource was last modified.

    Import

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

    $ pulumi import oci:Logging/logSavedSearch:LogSavedSearch test_log_saved_search "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