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

oci.DatabaseManagement.getManagedDatabaseSqlPlanBaselineJobs

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 Sql Plan Baseline Jobs in Oracle Cloud Infrastructure Database Management service.

    Lists the database jobs used for loading SQL plan baselines in the specified Managed Database.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedDatabaseSqlPlanBaselineJobs = oci.DatabaseManagement.getManagedDatabaseSqlPlanBaselineJobs({
        managedDatabaseId: testManagedDatabase.id,
        name: managedDatabaseSqlPlanBaselineJobName,
        opcNamedCredentialId: managedDatabaseSqlPlanBaselineJobOpcNamedCredentialId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_sql_plan_baseline_jobs = oci.DatabaseManagement.get_managed_database_sql_plan_baseline_jobs(managed_database_id=test_managed_database["id"],
        name=managed_database_sql_plan_baseline_job_name,
        opc_named_credential_id=managed_database_sql_plan_baseline_job_opc_named_credential_id)
    
    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.GetManagedDatabaseSqlPlanBaselineJobs(ctx, &databasemanagement.GetManagedDatabaseSqlPlanBaselineJobsArgs{
    			ManagedDatabaseId:    testManagedDatabase.Id,
    			Name:                 pulumi.StringRef(managedDatabaseSqlPlanBaselineJobName),
    			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlPlanBaselineJobOpcNamedCredentialId),
    		}, 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 testManagedDatabaseSqlPlanBaselineJobs = Oci.DatabaseManagement.GetManagedDatabaseSqlPlanBaselineJobs.Invoke(new()
        {
            ManagedDatabaseId = testManagedDatabase.Id,
            Name = managedDatabaseSqlPlanBaselineJobName,
            OpcNamedCredentialId = managedDatabaseSqlPlanBaselineJobOpcNamedCredentialId,
        });
    
    });
    
    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.GetManagedDatabaseSqlPlanBaselineJobsArgs;
    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 testManagedDatabaseSqlPlanBaselineJobs = DatabaseManagementFunctions.getManagedDatabaseSqlPlanBaselineJobs(GetManagedDatabaseSqlPlanBaselineJobsArgs.builder()
                .managedDatabaseId(testManagedDatabase.id())
                .name(managedDatabaseSqlPlanBaselineJobName)
                .opcNamedCredentialId(managedDatabaseSqlPlanBaselineJobOpcNamedCredentialId)
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseSqlPlanBaselineJobs:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseSqlPlanBaselineJobs
          Arguments:
            managedDatabaseId: ${testManagedDatabase.id}
            name: ${managedDatabaseSqlPlanBaselineJobName}
            opcNamedCredentialId: ${managedDatabaseSqlPlanBaselineJobOpcNamedCredentialId}
    

    Using getManagedDatabaseSqlPlanBaselineJobs

    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 getManagedDatabaseSqlPlanBaselineJobs(args: GetManagedDatabaseSqlPlanBaselineJobsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlPlanBaselineJobsResult>
    function getManagedDatabaseSqlPlanBaselineJobsOutput(args: GetManagedDatabaseSqlPlanBaselineJobsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlPlanBaselineJobsResult>
    def get_managed_database_sql_plan_baseline_jobs(filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseSqlPlanBaselineJobsFilter]] = None,
                                                    managed_database_id: Optional[str] = None,
                                                    name: Optional[str] = None,
                                                    opc_named_credential_id: Optional[str] = None,
                                                    opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlPlanBaselineJobsResult
    def get_managed_database_sql_plan_baseline_jobs_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseSqlPlanBaselineJobsFilterArgs]]]] = None,
                                                    managed_database_id: Optional[pulumi.Input[str]] = None,
                                                    name: Optional[pulumi.Input[str]] = None,
                                                    opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                                                    opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlPlanBaselineJobsResult]
    func GetManagedDatabaseSqlPlanBaselineJobs(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineJobsArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlPlanBaselineJobsResult, error)
    func GetManagedDatabaseSqlPlanBaselineJobsOutput(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineJobsOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlPlanBaselineJobsResultOutput

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

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

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters List<GetManagedDatabaseSqlPlanBaselineJobsFilter>
    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    Filters []GetManagedDatabaseSqlPlanBaselineJobsFilter
    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<GetManagedDatabaseSqlPlanBaselineJobsFilter>
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    opcNamedCredentialId String
    The OCID of the Named Credential.
    managedDatabaseId string
    The OCID of the Managed Database.
    filters GetManagedDatabaseSqlPlanBaselineJobsFilter[]
    name string
    A filter to return the SQL plan baseline jobs that match the name.
    opcNamedCredentialId string
    The OCID of the Named Credential.
    managed_database_id str
    The OCID of the Managed Database.
    filters Sequence[databasemanagement.GetManagedDatabaseSqlPlanBaselineJobsFilter]
    name str
    A filter to return the SQL plan baseline jobs that match the name.
    opc_named_credential_id str
    The OCID of the Named Credential.
    managedDatabaseId String
    The OCID of the Managed Database.
    filters List<Property Map>
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    opcNamedCredentialId String
    The OCID of the Named Credential.

    getManagedDatabaseSqlPlanBaselineJobs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    SqlPlanBaselineJobCollections List<GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollection>
    The list of sql_plan_baseline_job_collection.
    Filters List<GetManagedDatabaseSqlPlanBaselineJobsFilter>
    Name string
    The name of the job.
    OpcNamedCredentialId string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    SqlPlanBaselineJobCollections []GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollection
    The list of sql_plan_baseline_job_collection.
    Filters []GetManagedDatabaseSqlPlanBaselineJobsFilter
    Name string
    The name of the job.
    OpcNamedCredentialId string
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    sqlPlanBaselineJobCollections List<GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollection>
    The list of sql_plan_baseline_job_collection.
    filters List<GetManagedDatabaseSqlPlanBaselineJobsFilter>
    name String
    The name of the job.
    opcNamedCredentialId String
    id string
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId string
    sqlPlanBaselineJobCollections GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollection[]
    The list of sql_plan_baseline_job_collection.
    filters GetManagedDatabaseSqlPlanBaselineJobsFilter[]
    name string
    The name of the job.
    opcNamedCredentialId string
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    sqlPlanBaselineJobCollections List<Property Map>
    The list of sql_plan_baseline_job_collection.
    filters List<Property Map>
    name String
    The name of the job.
    opcNamedCredentialId String

    Supporting Types

    GetManagedDatabaseSqlPlanBaselineJobsFilter

    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    Values List<string>
    Regex bool
    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    Values []string
    Regex bool
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    values List<String>
    regex Boolean
    name string
    A filter to return the SQL plan baseline jobs that match the name.
    values string[]
    regex boolean
    name str
    A filter to return the SQL plan baseline jobs that match the name.
    values Sequence[str]
    regex bool
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    values List<String>
    regex Boolean

    GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollection

    items List<Property Map>
    A list of SQL plan baseline jobs.

    GetManagedDatabaseSqlPlanBaselineJobsSqlPlanBaselineJobCollectionItem

    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    Status string
    The status of the job.
    TimeCreated string
    The date and time the job was created.
    Type string
    The type of the job.
    Name string
    A filter to return the SQL plan baseline jobs that match the name.
    Status string
    The status of the job.
    TimeCreated string
    The date and time the job was created.
    Type string
    The type of the job.
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    status String
    The status of the job.
    timeCreated String
    The date and time the job was created.
    type String
    The type of the job.
    name string
    A filter to return the SQL plan baseline jobs that match the name.
    status string
    The status of the job.
    timeCreated string
    The date and time the job was created.
    type string
    The type of the job.
    name str
    A filter to return the SQL plan baseline jobs that match the name.
    status str
    The status of the job.
    time_created str
    The date and time the job was created.
    type str
    The type of the job.
    name String
    A filter to return the SQL plan baseline jobs that match the name.
    status String
    The status of the job.
    timeCreated String
    The date and time the job was created.
    type String
    The type of the job.

    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