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

oci.DatabaseManagement.getManagedDatabaseSqlTuningSet

Explore with Pulumi AI

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

    This data source provides details about a specific Managed Database Sql Tuning Set resource 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 testManagedDatabaseSqlTuningSet = oci.DatabaseManagement.getManagedDatabaseSqlTuningSet({
        managedDatabaseId: testManagedDatabase.id,
        nameContains: managedDatabaseSqlTuningSetNameContains,
        owner: managedDatabaseSqlTuningSetOwner,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_sql_tuning_set = oci.DatabaseManagement.get_managed_database_sql_tuning_set(managed_database_id=test_managed_database["id"],
        name_contains=managed_database_sql_tuning_set_name_contains,
        owner=managed_database_sql_tuning_set_owner)
    
    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.GetManagedDatabaseSqlTuningSet(ctx, &databasemanagement.GetManagedDatabaseSqlTuningSetArgs{
    			ManagedDatabaseId: testManagedDatabase.Id,
    			NameContains:      pulumi.StringRef(managedDatabaseSqlTuningSetNameContains),
    			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 testManagedDatabaseSqlTuningSet = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningSet.Invoke(new()
        {
            ManagedDatabaseId = testManagedDatabase.Id,
            NameContains = managedDatabaseSqlTuningSetNameContains,
            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.GetManagedDatabaseSqlTuningSetArgs;
    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 testManagedDatabaseSqlTuningSet = DatabaseManagementFunctions.getManagedDatabaseSqlTuningSet(GetManagedDatabaseSqlTuningSetArgs.builder()
                .managedDatabaseId(testManagedDatabase.id())
                .nameContains(managedDatabaseSqlTuningSetNameContains)
                .owner(managedDatabaseSqlTuningSetOwner)
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseSqlTuningSet:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningSet
          Arguments:
            managedDatabaseId: ${testManagedDatabase.id}
            nameContains: ${managedDatabaseSqlTuningSetNameContains}
            owner: ${managedDatabaseSqlTuningSetOwner}
    

    Using getManagedDatabaseSqlTuningSet

    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 getManagedDatabaseSqlTuningSet(args: GetManagedDatabaseSqlTuningSetArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningSetResult>
    function getManagedDatabaseSqlTuningSetOutput(args: GetManagedDatabaseSqlTuningSetOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningSetResult>
    def get_managed_database_sql_tuning_set(managed_database_id: Optional[str] = None,
                                            name_contains: Optional[str] = None,
                                            owner: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningSetResult
    def get_managed_database_sql_tuning_set_output(managed_database_id: Optional[pulumi.Input[str]] = None,
                                            name_contains: Optional[pulumi.Input[str]] = None,
                                            owner: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningSetResult]
    func GetManagedDatabaseSqlTuningSet(ctx *Context, args *GetManagedDatabaseSqlTuningSetArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningSetResult, error)
    func GetManagedDatabaseSqlTuningSetOutput(ctx *Context, args *GetManagedDatabaseSqlTuningSetOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningSetResultOutput

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

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

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    NameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    Owner string
    The owner of the SQL tuning set.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    NameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    Owner string
    The owner of the SQL tuning set.
    managedDatabaseId String
    The OCID of the Managed Database.
    nameContains String
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    owner String
    The owner of the SQL tuning set.
    managedDatabaseId string
    The OCID of the Managed Database.
    nameContains string
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    owner string
    The owner of the SQL tuning set.
    managed_database_id str
    The OCID of the Managed Database.
    name_contains str
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    owner str
    The owner of the SQL tuning set.
    managedDatabaseId String
    The OCID of the Managed Database.
    nameContains String
    Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive.
    owner String
    The owner of the SQL tuning set.

    getManagedDatabaseSqlTuningSet Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetManagedDatabaseSqlTuningSetItem>
    The details in the SQL tuning set summary.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    NameContains string
    Owner string
    The owner of the SQL tuning set.
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetManagedDatabaseSqlTuningSetItem
    The details in the SQL tuning set summary.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    NameContains string
    Owner string
    The owner of the SQL tuning set.
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetManagedDatabaseSqlTuningSetItem>
    The details in the SQL tuning set summary.
    managedDatabaseId String
    The OCID of the Managed Database.
    nameContains String
    owner String
    The owner of the SQL tuning set.
    id string
    The provider-assigned unique ID for this managed resource.
    items GetManagedDatabaseSqlTuningSetItem[]
    The details in the SQL tuning set summary.
    managedDatabaseId string
    The OCID of the Managed Database.
    nameContains string
    owner string
    The owner of the SQL tuning set.
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[databasemanagement.GetManagedDatabaseSqlTuningSetItem]
    The details in the SQL tuning set summary.
    managed_database_id str
    The OCID of the Managed Database.
    name_contains str
    owner str
    The owner of the SQL tuning set.
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The details in the SQL tuning set summary.
    managedDatabaseId String
    The OCID of the Managed Database.
    nameContains String
    owner String
    The owner of the SQL tuning set.

    Supporting Types

    GetManagedDatabaseSqlTuningSetItem

    Description string
    The description of the SQL tuning set.
    Name string
    The name of the SQL tuning set.
    Owner string
    The owner of the SQL tuning set.
    StatementCounts int
    The number of SQL statements in the SQL tuning set.
    Description string
    The description of the SQL tuning set.
    Name string
    The name of the SQL tuning set.
    Owner string
    The owner of the SQL tuning set.
    StatementCounts int
    The number of SQL statements in the SQL tuning set.
    description String
    The description of the SQL tuning set.
    name String
    The name of the SQL tuning set.
    owner String
    The owner of the SQL tuning set.
    statementCounts Integer
    The number of SQL statements in the SQL tuning set.
    description string
    The description of the SQL tuning set.
    name string
    The name of the SQL tuning set.
    owner string
    The owner of the SQL tuning set.
    statementCounts number
    The number of SQL statements in the SQL tuning set.
    description str
    The description of the SQL tuning set.
    name str
    The name of the SQL tuning set.
    owner str
    The owner of the SQL tuning set.
    statement_counts int
    The number of SQL statements in the SQL tuning set.
    description String
    The description of the SQL tuning set.
    name String
    The name of the SQL tuning set.
    owner String
    The owner of the SQL tuning set.
    statementCounts Number
    The number of SQL statements in 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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi