Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.CloudGuard.getAdhocQuery
Explore with Pulumi AI
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 LookupAdhocQuery(ctx *Context, args *LookupAdhocQueryArgs, opts ...InvokeOption) (*LookupAdhocQueryResult, error)
func LookupAdhocQueryOutput(ctx *Context, args *LookupAdhocQueryOutputArgs, opts ...InvokeOption) LookupAdhocQueryResultOutput> Note: This function is named LookupAdhocQuery 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)
public static Output<GetAdhocQueryResult> getAdhocQuery(GetAdhocQueryArgs args, InvokeOptions options)
fn::invoke:
  function: oci:CloudGuard/getAdhocQuery:getAdhocQuery
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AdhocQuery stringId 
- Adhoc query OCID.
- AdhocQuery stringId 
- Adhoc query OCID.
- adhocQuery StringId 
- Adhoc query OCID.
- adhocQuery stringId 
- Adhoc query OCID.
- adhoc_query_ strid 
- Adhoc query OCID.
- adhocQuery StringId 
- Adhoc query OCID.
getAdhocQuery Result
The following output properties are available:
- AdhocQuery List<GetDetails Adhoc Query Adhoc Query Detail> 
- Detailed information about the adhoc query.
- AdhocQuery stringId 
- AdhocQuery List<GetRegional Details Adhoc Query Adhoc Query Regional Detail> 
- Instance level status for each region
- CompartmentId string
- Compartment OCID of the adhoc query
- 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
- 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
- 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.
- AdhocQuery []GetDetails Adhoc Query Adhoc Query Detail 
- Detailed information about the adhoc query.
- AdhocQuery stringId 
- AdhocQuery []GetRegional Details Adhoc Query Adhoc Query Regional Detail 
- Instance level status for each region
- CompartmentId string
- Compartment OCID of the adhoc query
- 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
- 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
- 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.
- adhocQuery List<GetDetails Adhoc Query Adhoc Query Detail> 
- Detailed information about the adhoc query.
- adhocQuery StringId 
- adhocQuery List<GetRegional Details Adhoc Query Adhoc Query Regional Detail> 
- Instance level status for each region
- compartmentId String
- Compartment OCID of the adhoc query
- 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
- 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
- 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.
- adhocQuery GetDetails Adhoc Query Adhoc Query Detail[] 
- Detailed information about the adhoc query.
- adhocQuery stringId 
- adhocQuery GetRegional Details Adhoc Query Adhoc Query Regional Detail[] 
- Instance level status for each region
- compartmentId string
- Compartment OCID of the adhoc query
- {[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
- {[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
- {[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_ Sequence[Getdetails Adhoc Query Adhoc Query Detail] 
- Detailed information about the adhoc query.
- adhoc_query_ strid 
- adhoc_query_ Sequence[Getregional_ details Adhoc Query Adhoc Query Regional Detail] 
- Instance level status for each region
- compartment_id str
- Compartment OCID of the adhoc query
- 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
- 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
- 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.
- adhocQuery List<Property Map>Details 
- Detailed information about the adhoc query.
- adhocQuery StringId 
- adhocQuery List<Property Map>Regional Details 
- Instance level status for each region
- compartmentId String
- Compartment OCID of the adhoc query
- 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
- 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
- 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     
- AdhocQuery List<GetResources Adhoc Query Adhoc Query Detail Adhoc Query Resource> 
- Target information in which adhoc query will be run
- Query string
- The adhoc query expression that is run
- AdhocQuery []GetResources Adhoc Query Adhoc Query Detail Adhoc Query Resource 
- Target information in which adhoc query will be run
- Query string
- The adhoc query expression that is run
- adhocQuery List<GetResources Adhoc Query Adhoc Query Detail Adhoc Query Resource> 
- Target information in which adhoc query will be run
- query String
- The adhoc query expression that is run
- adhocQuery GetResources Adhoc Query Adhoc Query Detail Adhoc Query Resource[] 
- Target information in which adhoc query will be run
- query string
- The adhoc query expression that is run
- adhoc_query_ Sequence[Getresources Adhoc Query Adhoc Query Detail Adhoc Query Resource] 
- Target information in which adhoc query will be run
- query str
- The adhoc query expression that is run
- adhocQuery List<Property Map>Resources 
- 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 ociTerraform Provider.