1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CloudGuard
  5. getSavedQuery
Oracle Cloud Infrastructure v2.12.0 published on Friday, Oct 11, 2024 by Pulumi

oci.CloudGuard.getSavedQuery

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.12.0 published on Friday, Oct 11, 2024 by Pulumi

    This data source provides details about a specific Saved Query resource in Oracle Cloud Infrastructure Cloud Guard service.

    Returns a SavedQuery resource identified by savedQueryId.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSavedQuery = oci.CloudGuard.getSavedQuery({
        savedQueryId: testSavedQueryOciCloudGuardSavedQuery.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_saved_query = oci.CloudGuard.get_saved_query(saved_query_id=test_saved_query_oci_cloud_guard_saved_query["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/CloudGuard"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := CloudGuard.GetSavedQuery(ctx, &cloudguard.GetSavedQueryArgs{
    			SavedQueryId: testSavedQueryOciCloudGuardSavedQuery.Id,
    		}, nil)
    		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 testSavedQuery = Oci.CloudGuard.GetSavedQuery.Invoke(new()
        {
            SavedQueryId = testSavedQueryOciCloudGuardSavedQuery.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.CloudGuard.CloudGuardFunctions;
    import com.pulumi.oci.CloudGuard.inputs.GetSavedQueryArgs;
    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) {
            final var testSavedQuery = CloudGuardFunctions.getSavedQuery(GetSavedQueryArgs.builder()
                .savedQueryId(testSavedQueryOciCloudGuardSavedQuery.id())
                .build());
    
        }
    }
    
    variables:
      testSavedQuery:
        fn::invoke:
          Function: oci:CloudGuard:getSavedQuery
          Arguments:
            savedQueryId: ${testSavedQueryOciCloudGuardSavedQuery.id}
    

    Using getSavedQuery

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSavedQuery(args: GetSavedQueryArgs, opts?: InvokeOptions): Promise<GetSavedQueryResult>
    function getSavedQueryOutput(args: GetSavedQueryOutputArgs, opts?: InvokeOptions): Output<GetSavedQueryResult>
    def get_saved_query(saved_query_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetSavedQueryResult
    def get_saved_query_output(saved_query_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetSavedQueryResult]
    func GetSavedQuery(ctx *Context, args *GetSavedQueryArgs, opts ...InvokeOption) (*GetSavedQueryResult, error)
    func GetSavedQueryOutput(ctx *Context, args *GetSavedQueryOutputArgs, opts ...InvokeOption) GetSavedQueryResultOutput

    > Note: This function is named GetSavedQuery in the Go SDK.

    public static class GetSavedQuery 
    {
        public static Task<GetSavedQueryResult> InvokeAsync(GetSavedQueryArgs args, InvokeOptions? opts = null)
        public static Output<GetSavedQueryResult> Invoke(GetSavedQueryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSavedQueryResult> getSavedQuery(GetSavedQueryArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:CloudGuard/getSavedQuery:getSavedQuery
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SavedQueryId string
    Saved query OCID
    SavedQueryId string
    Saved query OCID
    savedQueryId String
    Saved query OCID
    savedQueryId string
    Saved query OCID
    saved_query_id str
    Saved query OCID
    savedQueryId String
    Saved query OCID

    getSavedQuery Result

    The following output properties are available:

    CompartmentId string
    Compartment OCID of the saved query
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of the saved query
    DisplayName string
    Display name of the saved query
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    OCID for the saved query
    Query string
    The saved query expression
    SavedQueryId string
    State string
    The current lifecycle state of the resource
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the saved query was created. Format defined by RFC3339.
    TimeUpdated string
    The date and time the saved query was updated. Format defined by RFC3339.
    CompartmentId string
    Compartment OCID of the saved query
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of the saved query
    DisplayName string
    Display name of the saved query
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    OCID for the saved query
    Query string
    The saved query expression
    SavedQueryId string
    State string
    The current lifecycle state of the resource
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the saved query was created. Format defined by RFC3339.
    TimeUpdated string
    The date and time the saved query was updated. Format defined by RFC3339.
    compartmentId String
    Compartment OCID of the saved query
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of the saved query
    displayName String
    Display name of the saved query
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    OCID for the saved query
    query String
    The saved query expression
    savedQueryId String
    state String
    The current lifecycle state of the resource
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the saved query was created. Format defined by RFC3339.
    timeUpdated String
    The date and time the saved query was updated. Format defined by RFC3339.
    compartmentId string
    Compartment OCID of the saved query
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    Description of the saved query
    displayName string
    Display name of the saved query
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    OCID for the saved query
    query string
    The saved query expression
    savedQueryId string
    state string
    The current lifecycle state of the resource
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the saved query was created. Format defined by RFC3339.
    timeUpdated string
    The date and time the saved query was updated. Format defined by RFC3339.
    compartment_id str
    Compartment OCID of the saved query
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    Description of the saved query
    display_name str
    Display name of the saved query
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    OCID for the saved query
    query str
    The saved query expression
    saved_query_id str
    state str
    The current lifecycle state of the resource
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time the saved query was created. Format defined by RFC3339.
    time_updated str
    The date and time the saved query was updated. Format defined by RFC3339.
    compartmentId String
    Compartment OCID of the saved query
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of the saved query
    displayName String
    Display name of the saved query
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    OCID for the saved query
    query String
    The saved query expression
    savedQueryId String
    state String
    The current lifecycle state of the resource
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the saved query was created. Format defined by RFC3339.
    timeUpdated String
    The date and time the saved query was updated. Format defined by RFC3339.

    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 v2.12.0 published on Friday, Oct 11, 2024 by Pulumi