1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Opsi
  5. getAwrHubAwrSnapshot
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

oci.Opsi.getAwrHubAwrSnapshot

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

    This data source provides details about a specific Awr Hub Awr Snapshot resource in Oracle Cloud Infrastructure Opsi service.

    Lists AWR snapshots for the specified source database in the AWR hub. The difference between the timeGreaterThanOrEqualTo and timeLessThanOrEqualTo should not exceed an elapsed range of 1 day. The timeGreaterThanOrEqualTo & timeLessThanOrEqualTo params are optional. If these params are not provided, by default last 1 day snapshots will be returned.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAwrHubAwrSnapshot = Oci.Opsi.GetAwrHubAwrSnapshot.Invoke(new()
        {
            AwrHubId = oci_opsi_awr_hub.Test_awr_hub.Id,
            AwrSourceDatabaseIdentifier = @var.Awr_hub_awr_snapshot_awr_source_database_identifier,
            TimeGreaterThanOrEqualTo = @var.Awr_hub_awr_snapshot_time_greater_than_or_equal_to,
            TimeLessThanOrEqualTo = @var.Awr_hub_awr_snapshot_time_less_than_or_equal_to,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Opsi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Opsi.GetAwrHubAwrSnapshot(ctx, &opsi.GetAwrHubAwrSnapshotArgs{
    			AwrHubId:                    oci_opsi_awr_hub.Test_awr_hub.Id,
    			AwrSourceDatabaseIdentifier: _var.Awr_hub_awr_snapshot_awr_source_database_identifier,
    			TimeGreaterThanOrEqualTo:    pulumi.StringRef(_var.Awr_hub_awr_snapshot_time_greater_than_or_equal_to),
    			TimeLessThanOrEqualTo:       pulumi.StringRef(_var.Awr_hub_awr_snapshot_time_less_than_or_equal_to),
    		}, 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.Opsi.OpsiFunctions;
    import com.pulumi.oci.Opsi.inputs.GetAwrHubAwrSnapshotArgs;
    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 testAwrHubAwrSnapshot = OpsiFunctions.getAwrHubAwrSnapshot(GetAwrHubAwrSnapshotArgs.builder()
                .awrHubId(oci_opsi_awr_hub.test_awr_hub().id())
                .awrSourceDatabaseIdentifier(var_.awr_hub_awr_snapshot_awr_source_database_identifier())
                .timeGreaterThanOrEqualTo(var_.awr_hub_awr_snapshot_time_greater_than_or_equal_to())
                .timeLessThanOrEqualTo(var_.awr_hub_awr_snapshot_time_less_than_or_equal_to())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_awr_hub_awr_snapshot = oci.Opsi.get_awr_hub_awr_snapshot(awr_hub_id=oci_opsi_awr_hub["test_awr_hub"]["id"],
        awr_source_database_identifier=var["awr_hub_awr_snapshot_awr_source_database_identifier"],
        time_greater_than_or_equal_to=var["awr_hub_awr_snapshot_time_greater_than_or_equal_to"],
        time_less_than_or_equal_to=var["awr_hub_awr_snapshot_time_less_than_or_equal_to"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAwrHubAwrSnapshot = oci.Opsi.getAwrHubAwrSnapshot({
        awrHubId: oci_opsi_awr_hub.test_awr_hub.id,
        awrSourceDatabaseIdentifier: _var.awr_hub_awr_snapshot_awr_source_database_identifier,
        timeGreaterThanOrEqualTo: _var.awr_hub_awr_snapshot_time_greater_than_or_equal_to,
        timeLessThanOrEqualTo: _var.awr_hub_awr_snapshot_time_less_than_or_equal_to,
    });
    
    variables:
      testAwrHubAwrSnapshot:
        fn::invoke:
          Function: oci:Opsi:getAwrHubAwrSnapshot
          Arguments:
            awrHubId: ${oci_opsi_awr_hub.test_awr_hub.id}
            awrSourceDatabaseIdentifier: ${var.awr_hub_awr_snapshot_awr_source_database_identifier}
            timeGreaterThanOrEqualTo: ${var.awr_hub_awr_snapshot_time_greater_than_or_equal_to}
            timeLessThanOrEqualTo: ${var.awr_hub_awr_snapshot_time_less_than_or_equal_to}
    

    Using getAwrHubAwrSnapshot

    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 getAwrHubAwrSnapshot(args: GetAwrHubAwrSnapshotArgs, opts?: InvokeOptions): Promise<GetAwrHubAwrSnapshotResult>
    function getAwrHubAwrSnapshotOutput(args: GetAwrHubAwrSnapshotOutputArgs, opts?: InvokeOptions): Output<GetAwrHubAwrSnapshotResult>
    def get_awr_hub_awr_snapshot(awr_hub_id: Optional[str] = None,
                                 awr_source_database_identifier: Optional[str] = None,
                                 time_greater_than_or_equal_to: Optional[str] = None,
                                 time_less_than_or_equal_to: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAwrHubAwrSnapshotResult
    def get_awr_hub_awr_snapshot_output(awr_hub_id: Optional[pulumi.Input[str]] = None,
                                 awr_source_database_identifier: Optional[pulumi.Input[str]] = None,
                                 time_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                                 time_less_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetAwrHubAwrSnapshotResult]
    func GetAwrHubAwrSnapshot(ctx *Context, args *GetAwrHubAwrSnapshotArgs, opts ...InvokeOption) (*GetAwrHubAwrSnapshotResult, error)
    func GetAwrHubAwrSnapshotOutput(ctx *Context, args *GetAwrHubAwrSnapshotOutputArgs, opts ...InvokeOption) GetAwrHubAwrSnapshotResultOutput

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

    public static class GetAwrHubAwrSnapshot 
    {
        public static Task<GetAwrHubAwrSnapshotResult> InvokeAsync(GetAwrHubAwrSnapshotArgs args, InvokeOptions? opts = null)
        public static Output<GetAwrHubAwrSnapshotResult> Invoke(GetAwrHubAwrSnapshotInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAwrHubAwrSnapshotResult> getAwrHubAwrSnapshot(GetAwrHubAwrSnapshotArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Opsi/getAwrHubAwrSnapshot:getAwrHubAwrSnapshot
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AwrHubId string

    Unique Awr Hub identifier

    AwrSourceDatabaseIdentifier string

    AWR source database identifier.

    TimeGreaterThanOrEqualTo string

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    TimeLessThanOrEqualTo string

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    AwrHubId string

    Unique Awr Hub identifier

    AwrSourceDatabaseIdentifier string

    AWR source database identifier.

    TimeGreaterThanOrEqualTo string

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    TimeLessThanOrEqualTo string

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    awrHubId String

    Unique Awr Hub identifier

    awrSourceDatabaseIdentifier String

    AWR source database identifier.

    timeGreaterThanOrEqualTo String

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    timeLessThanOrEqualTo String

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    awrHubId string

    Unique Awr Hub identifier

    awrSourceDatabaseIdentifier string

    AWR source database identifier.

    timeGreaterThanOrEqualTo string

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    timeLessThanOrEqualTo string

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    awr_hub_id str

    Unique Awr Hub identifier

    awr_source_database_identifier str

    AWR source database identifier.

    time_greater_than_or_equal_to str

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    time_less_than_or_equal_to str

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    awrHubId String

    Unique Awr Hub identifier

    awrSourceDatabaseIdentifier String

    AWR source database identifier.

    timeGreaterThanOrEqualTo String

    The optional greater than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    timeLessThanOrEqualTo String

    The optional less than or equal to query parameter to filter the timestamp. The timestamp format to be followed is: YYYY-MM-DDTHH:MM:SSZ, example 2020-12-03T19:00:53Z

    getAwrHubAwrSnapshot Result

    The following output properties are available:

    AwrHubId string
    AwrSourceDatabaseIdentifier string
    Id string

    The provider-assigned unique ID for this managed resource.

    Items List<GetAwrHubAwrSnapshotItem>

    A list of AWR snapshot summary data.

    TimeGreaterThanOrEqualTo string
    TimeLessThanOrEqualTo string
    AwrHubId string
    AwrSourceDatabaseIdentifier string
    Id string

    The provider-assigned unique ID for this managed resource.

    Items []GetAwrHubAwrSnapshotItem

    A list of AWR snapshot summary data.

    TimeGreaterThanOrEqualTo string
    TimeLessThanOrEqualTo string
    awrHubId String
    awrSourceDatabaseIdentifier String
    id String

    The provider-assigned unique ID for this managed resource.

    items List<GetAwrHubAwrSnapshotItem>

    A list of AWR snapshot summary data.

    timeGreaterThanOrEqualTo String
    timeLessThanOrEqualTo String
    awrHubId string
    awrSourceDatabaseIdentifier string
    id string

    The provider-assigned unique ID for this managed resource.

    items GetAwrHubAwrSnapshotItem[]

    A list of AWR snapshot summary data.

    timeGreaterThanOrEqualTo string
    timeLessThanOrEqualTo string
    awr_hub_id str
    awr_source_database_identifier str
    id str

    The provider-assigned unique ID for this managed resource.

    items GetAwrHubAwrSnapshotItem]

    A list of AWR snapshot summary data.

    time_greater_than_or_equal_to str
    time_less_than_or_equal_to str
    awrHubId String
    awrSourceDatabaseIdentifier String
    id String

    The provider-assigned unique ID for this managed resource.

    items List<Property Map>

    A list of AWR snapshot summary data.

    timeGreaterThanOrEqualTo String
    timeLessThanOrEqualTo String

    Supporting Types

    GetAwrHubAwrSnapshotItem

    AwrSourceDatabaseId string

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    ErrorCount string

    The total number of errors.

    InstanceNumber int

    The database instance number.

    SnapshotIdentifier int

    The identifier of the snapshot.

    TimeDbStartup string

    The timestamp of the database startup.

    TimeSnapshotBegin string

    The start time of the snapshot.

    TimeSnapshotEnd string

    The end time of the snapshot.

    AwrSourceDatabaseId string

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    ErrorCount string

    The total number of errors.

    InstanceNumber int

    The database instance number.

    SnapshotIdentifier int

    The identifier of the snapshot.

    TimeDbStartup string

    The timestamp of the database startup.

    TimeSnapshotBegin string

    The start time of the snapshot.

    TimeSnapshotEnd string

    The end time of the snapshot.

    awrSourceDatabaseId String

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    errorCount String

    The total number of errors.

    instanceNumber Integer

    The database instance number.

    snapshotIdentifier Integer

    The identifier of the snapshot.

    timeDbStartup String

    The timestamp of the database startup.

    timeSnapshotBegin String

    The start time of the snapshot.

    timeSnapshotEnd String

    The end time of the snapshot.

    awrSourceDatabaseId string

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    errorCount string

    The total number of errors.

    instanceNumber number

    The database instance number.

    snapshotIdentifier number

    The identifier of the snapshot.

    timeDbStartup string

    The timestamp of the database startup.

    timeSnapshotBegin string

    The start time of the snapshot.

    timeSnapshotEnd string

    The end time of the snapshot.

    awr_source_database_id str

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    error_count str

    The total number of errors.

    instance_number int

    The database instance number.

    snapshot_identifier int

    The identifier of the snapshot.

    time_db_startup str

    The timestamp of the database startup.

    time_snapshot_begin str

    The start time of the snapshot.

    time_snapshot_end str

    The end time of the snapshot.

    awrSourceDatabaseId String

    DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.

    errorCount String

    The total number of errors.

    instanceNumber Number

    The database instance number.

    snapshotIdentifier Number

    The identifier of the snapshot.

    timeDbStartup String

    The timestamp of the database startup.

    timeSnapshotBegin String

    The start time of the snapshot.

    timeSnapshotEnd String

    The end time of the snapshot.

    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.11.0 published on Wednesday, Sep 27, 2023 by Pulumi