1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CloudGuard
  5. getAdhocQuery
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.CloudGuard.getAdhocQuery

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

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

    Returns an adhoc query identified by adhocQueryId.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAdhocQuery = oci.CloudGuard.getAdhocQuery({
        adhocQueryId: testAdhocQueryOciCloudGuardAdhocQuery.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_adhoc_query = oci.CloudGuard.get_adhoc_query(adhoc_query_id=test_adhoc_query_oci_cloud_guard_adhoc_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.GetAdhocQuery(ctx, &cloudguard.GetAdhocQueryArgs{
    			AdhocQueryId: testAdhocQueryOciCloudGuardAdhocQuery.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 testAdhocQuery = Oci.CloudGuard.GetAdhocQuery.Invoke(new()
        {
            AdhocQueryId = testAdhocQueryOciCloudGuardAdhocQuery.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.GetAdhocQueryArgs;
    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 testAdhocQuery = CloudGuardFunctions.getAdhocQuery(GetAdhocQueryArgs.builder()
                .adhocQueryId(testAdhocQueryOciCloudGuardAdhocQuery.id())
                .build());
    
        }
    }
    
    variables:
      testAdhocQuery:
        fn::invoke:
          Function: oci:CloudGuard:getAdhocQuery
          Arguments:
            adhocQueryId: ${testAdhocQueryOciCloudGuardAdhocQuery.id}
    

    Using getAdhocQuery

    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 getAdhocQuery(args: GetAdhocQueryArgs, opts?: InvokeOptions): Promise<GetAdhocQueryResult>
    function getAdhocQueryOutput(args: GetAdhocQueryOutputArgs, opts?: InvokeOptions): Output<GetAdhocQueryResult>
    def get_adhoc_query(adhoc_query_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAdhocQueryResult
    def get_adhoc_query_output(adhoc_query_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAdhocQueryResult]
    func GetAdhocQuery(ctx *Context, args *GetAdhocQueryArgs, opts ...InvokeOption) (*GetAdhocQueryResult, error)
    func GetAdhocQueryOutput(ctx *Context, args *GetAdhocQueryOutputArgs, opts ...InvokeOption) GetAdhocQueryResultOutput

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

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

    The following arguments are supported:

    AdhocQueryId string
    Adhoc query OCID.
    AdhocQueryId string
    Adhoc query OCID.
    adhocQueryId String
    Adhoc query OCID.
    adhocQueryId string
    Adhoc query OCID.
    adhoc_query_id str
    Adhoc query OCID.
    adhocQueryId String
    Adhoc query OCID.

    getAdhocQuery Result

    The following output properties are available:

    AdhocQueryDetails List<GetAdhocQueryAdhocQueryDetail>
    Detailed information about the adhoc query.
    AdhocQueryId string
    AdhocQueryRegionalDetails List<GetAdhocQueryAdhocQueryRegionalDetail>
    Instance level status for each region
    CompartmentId string
    Compartment OCID of the adhoc 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"}
    ErrorMessage string
    Error message to show on UI in case of failure
    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 adhoc query
    State string
    The current lifecycle state of the resource.
    Status string
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    TimeUpdated string
    The date and time the adhoc query was updated. Format defined by RFC3339.
    AdhocQueryDetails []GetAdhocQueryAdhocQueryDetail
    Detailed information about the adhoc query.
    AdhocQueryId string
    AdhocQueryRegionalDetails []GetAdhocQueryAdhocQueryRegionalDetail
    Instance level status for each region
    CompartmentId string
    Compartment OCID of the adhoc 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"}
    ErrorMessage string
    Error message to show on UI in case of failure
    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 adhoc query
    State string
    The current lifecycle state of the resource.
    Status string
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    TimeUpdated string
    The date and time the adhoc query was updated. Format defined by RFC3339.
    adhocQueryDetails List<GetAdhocQueryAdhocQueryDetail>
    Detailed information about the adhoc query.
    adhocQueryId String
    adhocQueryRegionalDetails List<GetAdhocQueryAdhocQueryRegionalDetail>
    Instance level status for each region
    compartmentId String
    Compartment OCID of the adhoc 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"}
    errorMessage String
    Error message to show on UI in case of failure
    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 adhoc query
    state String
    The current lifecycle state of the resource.
    status String
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    timeUpdated String
    The date and time the adhoc query was updated. Format defined by RFC3339.
    adhocQueryDetails GetAdhocQueryAdhocQueryDetail[]
    Detailed information about the adhoc query.
    adhocQueryId string
    adhocQueryRegionalDetails GetAdhocQueryAdhocQueryRegionalDetail[]
    Instance level status for each region
    compartmentId string
    Compartment OCID of the adhoc 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"}
    errorMessage string
    Error message to show on UI in case of failure
    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 adhoc query
    state string
    The current lifecycle state of the resource.
    status string
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    timeUpdated string
    The date and time the adhoc query was updated. Format defined by RFC3339.
    adhoc_query_details Sequence[cloudguard.GetAdhocQueryAdhocQueryDetail]
    Detailed information about the adhoc query.
    adhoc_query_id str
    adhoc_query_regional_details Sequence[cloudguard.GetAdhocQueryAdhocQueryRegionalDetail]
    Instance level status for each region
    compartment_id str
    Compartment OCID of the adhoc 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"}
    error_message str
    Error message to show on UI in case of failure
    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 adhoc query
    state str
    The current lifecycle state of the resource.
    status str
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    time_updated str
    The date and time the adhoc query was updated. Format defined by RFC3339.
    adhocQueryDetails List<Property Map>
    Detailed information about the adhoc query.
    adhocQueryId String
    adhocQueryRegionalDetails List<Property Map>
    Instance level status for each region
    compartmentId String
    Compartment OCID of the adhoc query
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    errorMessage String
    Error message to show on UI in case of failure
    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 adhoc query
    state String
    The current lifecycle state of the resource.
    status String
    Status of the adhoc query
    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 adhoc query was created. Format defined by RFC3339.
    timeUpdated String
    The date and time the adhoc query was updated. Format defined by RFC3339.

    Supporting Types

    GetAdhocQueryAdhocQueryDetail

    AdhocQueryResources List<GetAdhocQueryAdhocQueryDetailAdhocQueryResource>
    Target information in which adhoc query will be run
    Query string
    The adhoc query expression that is run
    AdhocQueryResources []GetAdhocQueryAdhocQueryDetailAdhocQueryResource
    Target information in which adhoc query will be run
    Query string
    The adhoc query expression that is run
    adhocQueryResources List<GetAdhocQueryAdhocQueryDetailAdhocQueryResource>
    Target information in which adhoc query will be run
    query String
    The adhoc query expression that is run
    adhocQueryResources GetAdhocQueryAdhocQueryDetailAdhocQueryResource[]
    Target information in which adhoc query will be run
    query string
    The adhoc query expression that is run
    adhoc_query_resources Sequence[cloudguard.GetAdhocQueryAdhocQueryDetailAdhocQueryResource]
    Target information in which adhoc query will be run
    query str
    The adhoc query expression that is run
    adhocQueryResources List<Property Map>
    Target information in which adhoc query will be run
    query String
    The adhoc query expression that is run

    GetAdhocQueryAdhocQueryDetailAdhocQueryResource

    Region string
    Region name
    ResourceIds List<string>
    List of OCIDs on which query needs to be run
    ResourceType string
    Type of resource
    Region string
    Region name
    ResourceIds []string
    List of OCIDs on which query needs to be run
    ResourceType string
    Type of resource
    region String
    Region name
    resourceIds List<String>
    List of OCIDs on which query needs to be run
    resourceType String
    Type of resource
    region string
    Region name
    resourceIds string[]
    List of OCIDs on which query needs to be run
    resourceType string
    Type of resource
    region str
    Region name
    resource_ids Sequence[str]
    List of OCIDs on which query needs to be run
    resource_type str
    Type of resource
    region String
    Region name
    resourceIds List<String>
    List of OCIDs on which query needs to be run
    resourceType String
    Type of resource

    GetAdhocQueryAdhocQueryRegionalDetail

    ExpectedCount string
    Expected number of instances on which query should run
    ExpiredCount string
    Number of instances on which query expired
    FailedCount string
    Number of instances on which query failed
    Region string
    Region name
    RegionalError string
    error message to show if adhoc query fails in a region
    RegionalStatus string
    adhoc query status of the region
    SucceededCount string
    Number of instances on which query succeeded
    ExpectedCount string
    Expected number of instances on which query should run
    ExpiredCount string
    Number of instances on which query expired
    FailedCount string
    Number of instances on which query failed
    Region string
    Region name
    RegionalError string
    error message to show if adhoc query fails in a region
    RegionalStatus string
    adhoc query status of the region
    SucceededCount string
    Number of instances on which query succeeded
    expectedCount String
    Expected number of instances on which query should run
    expiredCount String
    Number of instances on which query expired
    failedCount String
    Number of instances on which query failed
    region String
    Region name
    regionalError String
    error message to show if adhoc query fails in a region
    regionalStatus String
    adhoc query status of the region
    succeededCount String
    Number of instances on which query succeeded
    expectedCount string
    Expected number of instances on which query should run
    expiredCount string
    Number of instances on which query expired
    failedCount string
    Number of instances on which query failed
    region string
    Region name
    regionalError string
    error message to show if adhoc query fails in a region
    regionalStatus string
    adhoc query status of the region
    succeededCount string
    Number of instances on which query succeeded
    expected_count str
    Expected number of instances on which query should run
    expired_count str
    Number of instances on which query expired
    failed_count str
    Number of instances on which query failed
    region str
    Region name
    regional_error str
    error message to show if adhoc query fails in a region
    regional_status str
    adhoc query status of the region
    succeeded_count str
    Number of instances on which query succeeded
    expectedCount String
    Expected number of instances on which query should run
    expiredCount String
    Number of instances on which query expired
    failedCount String
    Number of instances on which query failed
    region String
    Region name
    regionalError String
    error message to show if adhoc query fails in a region
    regionalStatus String
    adhoc query status of the region
    succeededCount String
    Number of instances on which query succeeded

    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.11.0 published on Thursday, Sep 19, 2024 by Pulumi