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

oci.DatabaseManagement.getManagedDatabaseSqlTuningSets

Explore with Pulumi AI

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

    This data source provides the list of Managed Database Sql Tuning Sets in Oracle Cloud Infrastructure Database Management service.

    Lists the SQL tuning sets for the specified Managed Database.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedDatabaseSqlTuningSets = oci.DatabaseManagement.getManagedDatabaseSqlTuningSets({
        managedDatabaseId: testManagedDatabase.id,
        nameContains: managedDatabaseSqlTuningSetNameContains,
        opcNamedCredentialId: managedDatabaseSqlTuningSetOpcNamedCredentialId,
        owner: managedDatabaseSqlTuningSetOwner,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_sql_tuning_sets = oci.DatabaseManagement.get_managed_database_sql_tuning_sets(managed_database_id=test_managed_database["id"],
        name_contains=managed_database_sql_tuning_set_name_contains,
        opc_named_credential_id=managed_database_sql_tuning_set_opc_named_credential_id,
        owner=managed_database_sql_tuning_set_owner)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/DatabaseManagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DatabaseManagement.GetManagedDatabaseSqlTuningSets(ctx, &databasemanagement.GetManagedDatabaseSqlTuningSetsArgs{
    			ManagedDatabaseId:    testManagedDatabase.Id,
    			NameContains:         pulumi.StringRef(managedDatabaseSqlTuningSetNameContains),
    			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlTuningSetOpcNamedCredentialId),
    			Owner:                pulumi.StringRef(managedDatabaseSqlTuningSetOwner),
    		}, 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 testManagedDatabaseSqlTuningSets = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningSets.Invoke(new()
        {
            ManagedDatabaseId = testManagedDatabase.Id,
            NameContains = managedDatabaseSqlTuningSetNameContains,
            OpcNamedCredentialId = managedDatabaseSqlTuningSetOpcNamedCredentialId,
            Owner = managedDatabaseSqlTuningSetOwner,
        });
    
    });
    
    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.GetManagedDatabaseSqlTuningSetsArgs;
    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 testManagedDatabaseSqlTuningSets = DatabaseManagementFunctions.getManagedDatabaseSqlTuningSets(GetManagedDatabaseSqlTuningSetsArgs.builder()
                .managedDatabaseId(testManagedDatabase.id())
                .nameContains(managedDatabaseSqlTuningSetNameContains)
                .opcNamedCredentialId(managedDatabaseSqlTuningSetOpcNamedCredentialId)
                .owner(managedDatabaseSqlTuningSetOwner)
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseSqlTuningSets:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningSets
          Arguments:
            managedDatabaseId: ${testManagedDatabase.id}
            nameContains: ${managedDatabaseSqlTuningSetNameContains}
            opcNamedCredentialId: ${managedDatabaseSqlTuningSetOpcNamedCredentialId}
            owner: ${managedDatabaseSqlTuningSetOwner}
    

    Using getManagedDatabaseSqlTuningSets

    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 getManagedDatabaseSqlTuningSets(args: GetManagedDatabaseSqlTuningSetsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningSetsResult>
    function getManagedDatabaseSqlTuningSetsOutput(args: GetManagedDatabaseSqlTuningSetsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningSetsResult>
    def get_managed_database_sql_tuning_sets(filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseSqlTuningSetsFilter]] = None,
                                             managed_database_id: Optional[str] = None,
                                             name_contains: Optional[str] = None,
                                             opc_named_credential_id: Optional[str] = None,
                                             owner: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningSetsResult
    def get_managed_database_sql_tuning_sets_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseSqlTuningSetsFilterArgs]]]] = None,
                                             managed_database_id: Optional[pulumi.Input[str]] = None,
                                             name_contains: Optional[pulumi.Input[str]] = None,
                                             opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                                             owner: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningSetsResult]
    func GetManagedDatabaseSqlTuningSets(ctx *Context, args *GetManagedDatabaseSqlTuningSetsArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningSetsResult, error)
    func GetManagedDatabaseSqlTuningSetsOutput(ctx *Context, args *GetManagedDatabaseSqlTuningSetsOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningSetsResultOutput

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

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

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters List<GetManagedDatabaseSqlTuningSetsFilter>
    NameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    Owner string
    The owner of the SQL tuning set.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters []GetManagedDatabaseSqlTuningSetsFilter
    NameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    Owner string
    The owner of the SQL tuning set.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<GetManagedDatabaseSqlTuningSetsFilter>
    nameContains String
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    opcNamedCredentialId String
    The OCID of the Named Credential.
    owner String
    The owner of the SQL tuning set.
    managedDatabaseId string
    The OCID of the Managed Database.
    filters GetManagedDatabaseSqlTuningSetsFilter[]
    nameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    opcNamedCredentialId string
    The OCID of the Named Credential.
    owner string
    The owner of the SQL tuning set.
    managed_database_id str
    The OCID of the Managed Database.
    filters Sequence[databasemanagement.GetManagedDatabaseSqlTuningSetsFilter]
    name_contains str
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    opc_named_credential_id str
    The OCID of the Named Credential.
    owner str
    The owner of the SQL tuning set.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<Property Map>
    nameContains String
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    opcNamedCredentialId String
    The OCID of the Named Credential.
    owner String
    The owner of the SQL tuning set.

    getManagedDatabaseSqlTuningSets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    SqlTuningSetCollections List<GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection>
    The list of sql_tuning_set_collection.
    Filters List<GetManagedDatabaseSqlTuningSetsFilter>
    NameContains string
    OpcNamedCredentialId string
    Owner string
    The owner of the SQL tuning set.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    SqlTuningSetCollections []GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection
    The list of sql_tuning_set_collection.
    Filters []GetManagedDatabaseSqlTuningSetsFilter
    NameContains string
    OpcNamedCredentialId string
    Owner string
    The owner of the SQL tuning set.
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    The OCID of the Managed Database.
    sqlTuningSetCollections List<GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection>
    The list of sql_tuning_set_collection.
    filters List<GetManagedDatabaseSqlTuningSetsFilter>
    nameContains String
    opcNamedCredentialId String
    owner String
    The owner of the SQL tuning set.
    id string
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId string
    The OCID of the Managed Database.
    sqlTuningSetCollections GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection[]
    The list of sql_tuning_set_collection.
    filters GetManagedDatabaseSqlTuningSetsFilter[]
    nameContains string
    opcNamedCredentialId string
    owner string
    The owner of the SQL tuning set.
    id str
    The provider-assigned unique ID for this managed resource.
    managed_database_id str
    The OCID of the Managed Database.
    sql_tuning_set_collections Sequence[databasemanagement.GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection]
    The list of sql_tuning_set_collection.
    filters Sequence[databasemanagement.GetManagedDatabaseSqlTuningSetsFilter]
    name_contains str
    opc_named_credential_id str
    owner str
    The owner of the SQL tuning set.
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    The OCID of the Managed Database.
    sqlTuningSetCollections List<Property Map>
    The list of sql_tuning_set_collection.
    filters List<Property Map>
    nameContains String
    opcNamedCredentialId String
    owner String
    The owner of the SQL tuning set.

    Supporting Types

    GetManagedDatabaseSqlTuningSetsFilter

    Name string
    The name of the SQL tuning set.
    Values List<string>
    Regex bool
    Name string
    The name of the SQL tuning set.
    Values []string
    Regex bool
    name String
    The name of the SQL tuning set.
    values List<String>
    regex Boolean
    name string
    The name of the SQL tuning set.
    values string[]
    regex boolean
    name str
    The name of the SQL tuning set.
    values Sequence[str]
    regex bool
    name String
    The name of the SQL tuning set.
    values List<String>
    regex Boolean

    GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection

    Items []GetManagedDatabaseSqlTuningSetsSqlTuningSetCollectionItem
    The details in the SQL tuning set summary.
    items GetManagedDatabaseSqlTuningSetsSqlTuningSetCollectionItem[]
    The details in the SQL tuning set summary.
    items List<Property Map>
    The details in the SQL tuning set summary.

    GetManagedDatabaseSqlTuningSetsSqlTuningSetCollectionItem

    Description string
    The description of the SQL tuning set.
    ErrorMessage string
    Latest execution error of the plsql that was submitted as a scheduler job.
    Id int
    The unique Sql tuning set identifier. This is not OCID.
    Name string
    The name of the SQL tuning set.
    Owner string
    The owner of the SQL tuning set.
    ScheduledJobName string
    Name of the Sql tuning set scheduler job.
    StatementCounts int
    The number of SQL statements in the SQL tuning set.
    Status string
    Current status of the Sql tuning set.
    TimeCreated string
    The created time of the Sql tuning set.
    TimeLastModified string
    Last modified time of the Sql tuning set.
    Description string
    The description of the SQL tuning set.
    ErrorMessage string
    Latest execution error of the plsql that was submitted as a scheduler job.
    Id int
    The unique Sql tuning set identifier. This is not OCID.
    Name string
    The name of the SQL tuning set.
    Owner string
    The owner of the SQL tuning set.
    ScheduledJobName string
    Name of the Sql tuning set scheduler job.
    StatementCounts int
    The number of SQL statements in the SQL tuning set.
    Status string
    Current status of the Sql tuning set.
    TimeCreated string
    The created time of the Sql tuning set.
    TimeLastModified string
    Last modified time of the Sql tuning set.
    description String
    The description of the SQL tuning set.
    errorMessage String
    Latest execution error of the plsql that was submitted as a scheduler job.
    id Integer
    The unique Sql tuning set identifier. This is not OCID.
    name String
    The name of the SQL tuning set.
    owner String
    The owner of the SQL tuning set.
    scheduledJobName String
    Name of the Sql tuning set scheduler job.
    statementCounts Integer
    The number of SQL statements in the SQL tuning set.
    status String
    Current status of the Sql tuning set.
    timeCreated String
    The created time of the Sql tuning set.
    timeLastModified String
    Last modified time of the Sql tuning set.
    description string
    The description of the SQL tuning set.
    errorMessage string
    Latest execution error of the plsql that was submitted as a scheduler job.
    id number
    The unique Sql tuning set identifier. This is not OCID.
    name string
    The name of the SQL tuning set.
    owner string
    The owner of the SQL tuning set.
    scheduledJobName string
    Name of the Sql tuning set scheduler job.
    statementCounts number
    The number of SQL statements in the SQL tuning set.
    status string
    Current status of the Sql tuning set.
    timeCreated string
    The created time of the Sql tuning set.
    timeLastModified string
    Last modified time of the Sql tuning set.
    description str
    The description of the SQL tuning set.
    error_message str
    Latest execution error of the plsql that was submitted as a scheduler job.
    id int
    The unique Sql tuning set identifier. This is not OCID.
    name str
    The name of the SQL tuning set.
    owner str
    The owner of the SQL tuning set.
    scheduled_job_name str
    Name of the Sql tuning set scheduler job.
    statement_counts int
    The number of SQL statements in the SQL tuning set.
    status str
    Current status of the Sql tuning set.
    time_created str
    The created time of the Sql tuning set.
    time_last_modified str
    Last modified time of the Sql tuning set.
    description String
    The description of the SQL tuning set.
    errorMessage String
    Latest execution error of the plsql that was submitted as a scheduler job.
    id Number
    The unique Sql tuning set identifier. This is not OCID.
    name String
    The name of the SQL tuning set.
    owner String
    The owner of the SQL tuning set.
    scheduledJobName String
    Name of the Sql tuning set scheduler job.
    statementCounts Number
    The number of SQL statements in the SQL tuning set.
    status String
    Current status of the Sql tuning set.
    timeCreated String
    The created time of the Sql tuning set.
    timeLastModified String
    Last modified time of the Sql tuning set.

    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