oci.CloudGuard.SavedQuery
Explore with Pulumi AI
This resource provides the Saved Query resource in Oracle Cloud Infrastructure Cloud Guard service.
Creates a SavedQuery resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSavedQuery = new oci.cloudguard.SavedQuery("test_saved_query", {
compartmentId: compartmentId,
displayName: savedQueryDisplayName,
query: savedQueryQuery,
definedTags: {
"foo-namespace.bar-key": "value",
},
description: savedQueryDescription,
freeformTags: {
"bar-key": "value",
},
});
import pulumi
import pulumi_oci as oci
test_saved_query = oci.cloud_guard.SavedQuery("test_saved_query",
compartment_id=compartment_id,
display_name=saved_query_display_name,
query=saved_query_query,
defined_tags={
"foo-namespace.bar-key": "value",
},
description=saved_query_description,
freeform_tags={
"bar-key": "value",
})
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.NewSavedQuery(ctx, "test_saved_query", &CloudGuard.SavedQueryArgs{
CompartmentId: pulumi.Any(compartmentId),
DisplayName: pulumi.Any(savedQueryDisplayName),
Query: pulumi.Any(savedQueryQuery),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
Description: pulumi.Any(savedQueryDescription),
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
})
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 = new Oci.CloudGuard.SavedQuery("test_saved_query", new()
{
CompartmentId = compartmentId,
DisplayName = savedQueryDisplayName,
Query = savedQueryQuery,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
Description = savedQueryDescription,
FreeformTags =
{
{ "bar-key", "value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.SavedQuery;
import com.pulumi.oci.CloudGuard.SavedQueryArgs;
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 testSavedQuery = new SavedQuery("testSavedQuery", SavedQueryArgs.builder()
.compartmentId(compartmentId)
.displayName(savedQueryDisplayName)
.query(savedQueryQuery)
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.description(savedQueryDescription)
.freeformTags(Map.of("bar-key", "value"))
.build());
}
}
resources:
testSavedQuery:
type: oci:CloudGuard:SavedQuery
name: test_saved_query
properties:
compartmentId: ${compartmentId}
displayName: ${savedQueryDisplayName}
query: ${savedQueryQuery}
definedTags:
foo-namespace.bar-key: value
description: ${savedQueryDescription}
freeformTags:
bar-key: value
Create SavedQuery Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SavedQuery(name: string, args: SavedQueryArgs, opts?: CustomResourceOptions);
@overload
def SavedQuery(resource_name: str,
args: SavedQueryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SavedQuery(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
query: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None)
func NewSavedQuery(ctx *Context, name string, args SavedQueryArgs, opts ...ResourceOption) (*SavedQuery, error)
public SavedQuery(string name, SavedQueryArgs args, CustomResourceOptions? opts = null)
public SavedQuery(String name, SavedQueryArgs args)
public SavedQuery(String name, SavedQueryArgs args, CustomResourceOptions options)
type: oci:CloudGuard:SavedQuery
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 SavedQueryArgs
- 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 SavedQueryArgs
- 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 SavedQueryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SavedQueryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SavedQueryArgs
- 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 savedQueryResource = new Oci.CloudGuard.SavedQuery("savedQueryResource", new()
{
CompartmentId = "string",
DisplayName = "string",
Query = "string",
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
FreeformTags =
{
{ "string", "string" },
},
});
example, err := CloudGuard.NewSavedQuery(ctx, "savedQueryResource", &CloudGuard.SavedQueryArgs{
CompartmentId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Query: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var savedQueryResource = new SavedQuery("savedQueryResource", SavedQueryArgs.builder()
.compartmentId("string")
.displayName("string")
.query("string")
.definedTags(Map.of("string", "string"))
.description("string")
.freeformTags(Map.of("string", "string"))
.build());
saved_query_resource = oci.cloud_guard.SavedQuery("savedQueryResource",
compartment_id="string",
display_name="string",
query="string",
defined_tags={
"string": "string",
},
description="string",
freeform_tags={
"string": "string",
})
const savedQueryResource = new oci.cloudguard.SavedQuery("savedQueryResource", {
compartmentId: "string",
displayName: "string",
query: "string",
definedTags: {
string: "string",
},
description: "string",
freeformTags: {
string: "string",
},
});
type: oci:CloudGuard:SavedQuery
properties:
compartmentId: string
definedTags:
string: string
description: string
displayName: string
freeformTags:
string: string
query: string
SavedQuery Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SavedQuery resource accepts the following input properties:
- Compartment
Id string - (Updatable) Compartment OCID of the saved query
- Display
Name string - (Updatable) Display name of the saved query
- Query string
(Updatable) The adhoc query expression that is run
** 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
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) Description of the saved query
- Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Compartment
Id string - (Updatable) Compartment OCID of the saved query
- Display
Name string - (Updatable) Display name of the saved query
- Query string
(Updatable) The adhoc query expression that is run
** 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
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) Description of the saved query
- map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id String - (Updatable) Compartment OCID of the saved query
- display
Name String - (Updatable) Display name of the saved query
- query String
(Updatable) The adhoc query expression that is run
** 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
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) Description of the saved query
- Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id string - (Updatable) Compartment OCID of the saved query
- display
Name string - (Updatable) Display name of the saved query
- query string
(Updatable) The adhoc query expression that is run
** 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
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) Description of the saved query
- {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment_
id str - (Updatable) Compartment OCID of the saved query
- display_
name str - (Updatable) Display name of the saved query
- query str
(Updatable) The adhoc query expression that is run
** 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
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) Description of the saved query
- Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id String - (Updatable) Compartment OCID of the saved query
- display
Name String - (Updatable) Display name of the saved query
- query String
(Updatable) The adhoc query expression that is run
** 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
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) Description of the saved query
- Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
Outputs
All input properties are implicitly available as output properties. Additionally, the SavedQuery resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The current lifecycle state of the resource
- 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"}
- Time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- Time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The current lifecycle state of the resource
- 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"}
- Time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- Time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The current lifecycle state of the resource
- 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"}
- time
Created String - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated String - The date and time the saved query was updated. Format defined by RFC3339.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- The current lifecycle state of the resource
- {[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"}
- time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- The current lifecycle state of the resource
- 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.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The current lifecycle state of the resource
- 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"}
- time
Created String - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated String - The date and time the saved query was updated. Format defined by RFC3339.
Look up Existing SavedQuery Resource
Get an existing SavedQuery 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?: SavedQueryState, opts?: CustomResourceOptions): SavedQuery
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
query: Optional[str] = None,
state: Optional[str] = None,
system_tags: Optional[Mapping[str, str]] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> SavedQuery
func GetSavedQuery(ctx *Context, name string, id IDInput, state *SavedQueryState, opts ...ResourceOption) (*SavedQuery, error)
public static SavedQuery Get(string name, Input<string> id, SavedQueryState? state, CustomResourceOptions? opts = null)
public static SavedQuery get(String name, Output<String> id, SavedQueryState 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.
- Compartment
Id string - (Updatable) Compartment OCID of the saved query
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) Description of the saved query
- Display
Name string - (Updatable) Display name of the saved query
- Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Query string
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- 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"}
- Time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- Time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- Compartment
Id string - (Updatable) Compartment OCID of the saved query
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) Description of the saved query
- Display
Name string - (Updatable) Display name of the saved query
- map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Query string
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- 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"}
- Time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- Time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- compartment
Id String - (Updatable) Compartment OCID of the saved query
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) Description of the saved query
- display
Name String - (Updatable) Display name of the saved query
- Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- query String
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- 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"}
- time
Created String - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated String - The date and time the saved query was updated. Format defined by RFC3339.
- compartment
Id string - (Updatable) Compartment OCID of the saved query
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) Description of the saved query
- display
Name string - (Updatable) Display name of the saved query
- {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- query string
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- {[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"}
- time
Created string - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated string - The date and time the saved query was updated. Format defined by RFC3339.
- compartment_
id str - (Updatable) Compartment OCID of the saved query
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) Description of the saved query
- display_
name str - (Updatable) Display name of the saved query
- Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- query str
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- 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.
- compartment
Id String - (Updatable) Compartment OCID of the saved query
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) Description of the saved query
- display
Name String - (Updatable) Display name of the saved query
- Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- query String
(Updatable) The adhoc query expression that is run
** 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 current lifecycle state of the resource
- 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"}
- time
Created String - The date and time the saved query was created. Format defined by RFC3339.
- time
Updated String - The date and time the saved query was updated. Format defined by RFC3339.
Import
SavedQueries can be imported using the id
, e.g.
$ pulumi import oci:CloudGuard/savedQuery:SavedQuery test_saved_query "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.