Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getManagedDatabaseSqlTuningSets

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseSqlTuningSets = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningSets.Invoke(new()
    {
        ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
        NameContains = @var.Managed_database_sql_tuning_set_name_contains,
        Owner = @var.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.GetManagedDatabaseSqlTuningSets(ctx, &databasemanagement.GetManagedDatabaseSqlTuningSetsArgs{
			ManagedDatabaseId: oci_database_management_managed_database.Test_managed_database.Id,
			NameContains:      pulumi.StringRef(_var.Managed_database_sql_tuning_set_name_contains),
			Owner:             pulumi.StringRef(_var.Managed_database_sql_tuning_set_owner),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(oci_database_management_managed_database.test_managed_database().id())
            .nameContains(var_.managed_database_sql_tuning_set_name_contains())
            .owner(var_.managed_database_sql_tuning_set_owner())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_database_sql_tuning_sets = oci.DatabaseManagement.get_managed_database_sql_tuning_sets(managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"],
    name_contains=var["managed_database_sql_tuning_set_name_contains"],
    owner=var["managed_database_sql_tuning_set_owner"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseSqlTuningSets = oci.DatabaseManagement.getManagedDatabaseSqlTuningSets({
    managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
    nameContains: _var.managed_database_sql_tuning_set_name_contains,
    owner: _var.managed_database_sql_tuning_set_owner,
});
variables:
  testManagedDatabaseSqlTuningSets:
    Fn::Invoke:
      Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningSets
      Arguments:
        managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
        nameContains: ${var.managed_database_sql_tuning_set_name_contains}
        owner: ${var.managed_database_sql_tuning_set_owner}

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,
                                         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,
                                         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.

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.

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.

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.

owner string

The owner of the SQL tuning set.

managed_database_id str

The OCID of the Managed Database.

filters GetManagedDatabaseSqlTuningSetsFilter]
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.

filters List<Property Map>
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.

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
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
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
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
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 GetManagedDatabaseSqlTuningSetsSqlTuningSetCollection]

The list of sql_tuning_set_collection.

filters GetManagedDatabaseSqlTuningSetsFilter]
name_contains 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
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 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.

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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.