1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseCursorCacheStatements
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DatabaseManagement.getManagedDatabaseCursorCacheStatements

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides the list of Managed Database Cursor Cache Statements in Oracle Cloud Infrastructure Database Management service.

    Lists the SQL statements from shared SQL area, also called the cursor cache.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedDatabaseCursorCacheStatements = oci.DatabaseManagement.getManagedDatabaseCursorCacheStatements({
        managedDatabaseId: testManagedDatabase.id,
        opcNamedCredentialId: managedDatabaseCursorCacheStatementOpcNamedCredentialId,
        sqlText: managedDatabaseCursorCacheStatementSqlText,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_cursor_cache_statements = oci.DatabaseManagement.get_managed_database_cursor_cache_statements(managed_database_id=test_managed_database["id"],
        opc_named_credential_id=managed_database_cursor_cache_statement_opc_named_credential_id,
        sql_text=managed_database_cursor_cache_statement_sql_text)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseManagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DatabaseManagement.GetManagedDatabaseCursorCacheStatements(ctx, &databasemanagement.GetManagedDatabaseCursorCacheStatementsArgs{
    			ManagedDatabaseId:    testManagedDatabase.Id,
    			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseCursorCacheStatementOpcNamedCredentialId),
    			SqlText:              pulumi.StringRef(managedDatabaseCursorCacheStatementSqlText),
    		}, 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 testManagedDatabaseCursorCacheStatements = Oci.DatabaseManagement.GetManagedDatabaseCursorCacheStatements.Invoke(new()
        {
            ManagedDatabaseId = testManagedDatabase.Id,
            OpcNamedCredentialId = managedDatabaseCursorCacheStatementOpcNamedCredentialId,
            SqlText = managedDatabaseCursorCacheStatementSqlText,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
    import com.pulumi.oci.DatabaseManagement.inputs.GetManagedDatabaseCursorCacheStatementsArgs;
    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 testManagedDatabaseCursorCacheStatements = DatabaseManagementFunctions.getManagedDatabaseCursorCacheStatements(GetManagedDatabaseCursorCacheStatementsArgs.builder()
                .managedDatabaseId(testManagedDatabase.id())
                .opcNamedCredentialId(managedDatabaseCursorCacheStatementOpcNamedCredentialId)
                .sqlText(managedDatabaseCursorCacheStatementSqlText)
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseCursorCacheStatements:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseCursorCacheStatements
          Arguments:
            managedDatabaseId: ${testManagedDatabase.id}
            opcNamedCredentialId: ${managedDatabaseCursorCacheStatementOpcNamedCredentialId}
            sqlText: ${managedDatabaseCursorCacheStatementSqlText}
    

    Using getManagedDatabaseCursorCacheStatements

    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 getManagedDatabaseCursorCacheStatements(args: GetManagedDatabaseCursorCacheStatementsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseCursorCacheStatementsResult>
    function getManagedDatabaseCursorCacheStatementsOutput(args: GetManagedDatabaseCursorCacheStatementsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseCursorCacheStatementsResult>
    def get_managed_database_cursor_cache_statements(filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseCursorCacheStatementsFilter]] = None,
                                                     limit: Optional[int] = None,
                                                     managed_database_id: Optional[str] = None,
                                                     opc_named_credential_id: Optional[str] = None,
                                                     sql_text: Optional[str] = None,
                                                     opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseCursorCacheStatementsResult
    def get_managed_database_cursor_cache_statements_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseCursorCacheStatementsFilterArgs]]]] = None,
                                                     limit: Optional[pulumi.Input[int]] = None,
                                                     managed_database_id: Optional[pulumi.Input[str]] = None,
                                                     opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                                                     sql_text: Optional[pulumi.Input[str]] = None,
                                                     opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseCursorCacheStatementsResult]
    func GetManagedDatabaseCursorCacheStatements(ctx *Context, args *GetManagedDatabaseCursorCacheStatementsArgs, opts ...InvokeOption) (*GetManagedDatabaseCursorCacheStatementsResult, error)
    func GetManagedDatabaseCursorCacheStatementsOutput(ctx *Context, args *GetManagedDatabaseCursorCacheStatementsOutputArgs, opts ...InvokeOption) GetManagedDatabaseCursorCacheStatementsResultOutput

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

    public static class GetManagedDatabaseCursorCacheStatements 
    {
        public static Task<GetManagedDatabaseCursorCacheStatementsResult> InvokeAsync(GetManagedDatabaseCursorCacheStatementsArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedDatabaseCursorCacheStatementsResult> Invoke(GetManagedDatabaseCursorCacheStatementsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedDatabaseCursorCacheStatementsResult> getManagedDatabaseCursorCacheStatements(GetManagedDatabaseCursorCacheStatementsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseCursorCacheStatements:getManagedDatabaseCursorCacheStatements
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters List<GetManagedDatabaseCursorCacheStatementsFilter>
    Limit int
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    SqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters []GetManagedDatabaseCursorCacheStatementsFilter
    Limit int
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    SqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<GetManagedDatabaseCursorCacheStatementsFilter>
    limit Integer
    opcNamedCredentialId String
    The OCID of the Named Credential.
    sqlText String
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    managedDatabaseId string
    The OCID of the Managed Database.
    filters GetManagedDatabaseCursorCacheStatementsFilter[]
    limit number
    opcNamedCredentialId string
    The OCID of the Named Credential.
    sqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    managed_database_id str
    The OCID of the Managed Database.
    filters Sequence[databasemanagement.GetManagedDatabaseCursorCacheStatementsFilter]
    limit int
    opc_named_credential_id str
    The OCID of the Named Credential.
    sql_text str
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<Property Map>
    limit Number
    opcNamedCredentialId String
    The OCID of the Named Credential.
    sqlText String
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.

    getManagedDatabaseCursorCacheStatements Result

    The following output properties are available:

    CursorCacheStatementCollections List<GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollection>
    The list of cursor_cache_statement_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    Filters List<GetManagedDatabaseCursorCacheStatementsFilter>
    Limit int
    OpcNamedCredentialId string
    SqlText string
    The first thousand characters of the SQL text.
    CursorCacheStatementCollections []GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollection
    The list of cursor_cache_statement_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    Filters []GetManagedDatabaseCursorCacheStatementsFilter
    Limit int
    OpcNamedCredentialId string
    SqlText string
    The first thousand characters of the SQL text.
    cursorCacheStatementCollections List<GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollection>
    The list of cursor_cache_statement_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    filters List<GetManagedDatabaseCursorCacheStatementsFilter>
    limit Integer
    opcNamedCredentialId String
    sqlText String
    The first thousand characters of the SQL text.
    cursorCacheStatementCollections GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollection[]
    The list of cursor_cache_statement_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId string
    filters GetManagedDatabaseCursorCacheStatementsFilter[]
    limit number
    opcNamedCredentialId string
    sqlText string
    The first thousand characters of the SQL text.
    cursorCacheStatementCollections List<Property Map>
    The list of cursor_cache_statement_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    filters List<Property Map>
    limit Number
    opcNamedCredentialId String
    sqlText String
    The first thousand characters of the SQL text.

    Supporting Types

    GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollection

    items List<Property Map>
    A list of SQL statements in the cursor cache.

    GetManagedDatabaseCursorCacheStatementsCursorCacheStatementCollectionItem

    Schema string
    The name of the parsing schema.
    SqlId string
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    SqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    Schema string
    The name of the parsing schema.
    SqlId string
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    SqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    schema String
    The name of the parsing schema.
    sqlId String
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    sqlText String
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    schema string
    The name of the parsing schema.
    sqlId string
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    sqlText string
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    schema str
    The name of the parsing schema.
    sql_id str
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    sql_text str
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.
    schema String
    The name of the parsing schema.
    sqlId String
    The SQL statement identifier. Identifies a SQL statement in the cursor cache.
    sqlText String
    A filter to return all the SQL plan baselines that match the SQL text. By default, the search is case insensitive. To run an exact or case-sensitive search, double-quote the search string. You may also use the '%' symbol as a wildcard.

    GetManagedDatabaseCursorCacheStatementsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi