import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This data source provides the list of Adhoc Queries in Oracle Cloud Infrastructure Cloud Guard service. * * Returns a list of all adhoc queries (AdhocQuery resources) for a compartment * identified by compartmentId. List is returned in a AdhocQueryCollection resource * with page of AdhocQuerySummary resources. * * The ListAdhocQueries operation returns only the adhoc queries in 'compartmentId' passed. * The list does not include any subcompartments of the compartmentId passed. * * The parameter `accessLevel` specifies whether to return only those compartments for which the * requestor has INSPECT permissions on at least one resource directly * or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if * Principal doesn't have access to even one of the child compartments. This is valid only when * `compartmentIdInSubtree` is set to `true`. * * The parameter `compartmentIdInSubtree` applies when you perform ListAdhocQueries on the * `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. * To get a full list of all compartments and subcompartments in the tenancy (root compartment), * set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testAdhocQueries = oci.cloudguard.getAdhocQueries({ * compartmentId: compartmentId, * accessLevel: adhocQueryAccessLevel, * adhocQueryStatus: adhocQueryAdhocQueryStatus, * compartmentIdInSubtree: adhocQueryCompartmentIdInSubtree === "true", * timeEndedFilterQueryParam: adhocQueryTimeEndedFilterQueryParam, * timeStartedFilterQueryParam: adhocQueryTimeStartedFilterQueryParam, * }); * ``` */ export declare function getAdhocQueries(args: GetAdhocQueriesArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getAdhocQueries. */ export interface GetAdhocQueriesArgs { /** * Valid values are `RESTRICTED` and `ACCESSIBLE`. Default is `RESTRICTED`. Setting this to `ACCESSIBLE` returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to `RESTRICTED` permissions are checked and no partial results are displayed. */ accessLevel?: string; /** * The status of the adhoc query created. Default value for state is provisioning. If no value is specified state is provisioning. */ adhocQueryStatus?: string; /** * The OCID of the compartment in which to list resources. */ compartmentId: string; /** * Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the setting of `accessLevel`. */ compartmentIdInSubtree?: boolean; filters?: inputs.CloudGuard.GetAdhocQueriesFilter[]; /** * End time for a filter. If end time is not specified, end time will be set to current time. */ timeEndedFilterQueryParam?: string; /** * Start time for a filter. If start time is not specified, start time will be set to current time - 30 days. */ timeStartedFilterQueryParam?: string; } /** * A collection of values returned by getAdhocQueries. */ export interface GetAdhocQueriesResult { readonly accessLevel?: string; /** * The list of adhoc_query_collection. */ readonly adhocQueryCollections: outputs.CloudGuard.GetAdhocQueriesAdhocQueryCollection[]; readonly adhocQueryStatus?: string; /** * Compartment OCID of the adhoc query */ readonly compartmentId: string; readonly compartmentIdInSubtree?: boolean; readonly filters?: outputs.CloudGuard.GetAdhocQueriesFilter[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly timeEndedFilterQueryParam?: string; readonly timeStartedFilterQueryParam?: string; } /** * This data source provides the list of Adhoc Queries in Oracle Cloud Infrastructure Cloud Guard service. * * Returns a list of all adhoc queries (AdhocQuery resources) for a compartment * identified by compartmentId. List is returned in a AdhocQueryCollection resource * with page of AdhocQuerySummary resources. * * The ListAdhocQueries operation returns only the adhoc queries in 'compartmentId' passed. * The list does not include any subcompartments of the compartmentId passed. * * The parameter `accessLevel` specifies whether to return only those compartments for which the * requestor has INSPECT permissions on at least one resource directly * or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if * Principal doesn't have access to even one of the child compartments. This is valid only when * `compartmentIdInSubtree` is set to `true`. * * The parameter `compartmentIdInSubtree` applies when you perform ListAdhocQueries on the * `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. * To get a full list of all compartments and subcompartments in the tenancy (root compartment), * set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testAdhocQueries = oci.cloudguard.getAdhocQueries({ * compartmentId: compartmentId, * accessLevel: adhocQueryAccessLevel, * adhocQueryStatus: adhocQueryAdhocQueryStatus, * compartmentIdInSubtree: adhocQueryCompartmentIdInSubtree === "true", * timeEndedFilterQueryParam: adhocQueryTimeEndedFilterQueryParam, * timeStartedFilterQueryParam: adhocQueryTimeStartedFilterQueryParam, * }); * ``` */ export declare function getAdhocQueriesOutput(args: GetAdhocQueriesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getAdhocQueries. */ export interface GetAdhocQueriesOutputArgs { /** * Valid values are `RESTRICTED` and `ACCESSIBLE`. Default is `RESTRICTED`. Setting this to `ACCESSIBLE` returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to `RESTRICTED` permissions are checked and no partial results are displayed. */ accessLevel?: pulumi.Input; /** * The status of the adhoc query created. Default value for state is provisioning. If no value is specified state is provisioning. */ adhocQueryStatus?: pulumi.Input; /** * The OCID of the compartment in which to list resources. */ compartmentId: pulumi.Input; /** * Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the setting of `accessLevel`. */ compartmentIdInSubtree?: pulumi.Input; filters?: pulumi.Input[] | undefined>; /** * End time for a filter. If end time is not specified, end time will be set to current time. */ timeEndedFilterQueryParam?: pulumi.Input; /** * Start time for a filter. If start time is not specified, start time will be set to current time - 30 days. */ timeStartedFilterQueryParam?: pulumi.Input; } //# sourceMappingURL=getAdhocQueries.d.ts.map