1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Opsi
  5. getAwrHubAwrSnapshots
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Opsi.getAwrHubAwrSnapshots

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Awr Hub Awr Snapshots 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

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAwrHubAwrSnapshots = oci.Opsi.getAwrHubAwrSnapshots({
    awrHubId: testAwrHub.id,
    awrSourceDatabaseIdentifier: awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
    timeGreaterThanOrEqualTo: awrHubAwrSnapshotTimeGreaterThanOrEqualTo,
    timeLessThanOrEqualTo: awrHubAwrSnapshotTimeLessThanOrEqualTo,
});
Copy
import pulumi
import pulumi_oci as oci

test_awr_hub_awr_snapshots = oci.Opsi.get_awr_hub_awr_snapshots(awr_hub_id=test_awr_hub["id"],
    awr_source_database_identifier=awr_hub_awr_snapshot_awr_source_database_identifier,
    time_greater_than_or_equal_to=awr_hub_awr_snapshot_time_greater_than_or_equal_to,
    time_less_than_or_equal_to=awr_hub_awr_snapshot_time_less_than_or_equal_to)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/opsi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opsi.GetAwrHubAwrSnapshots(ctx, &opsi.GetAwrHubAwrSnapshotsArgs{
			AwrHubId:                    testAwrHub.Id,
			AwrSourceDatabaseIdentifier: awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
			TimeGreaterThanOrEqualTo:    pulumi.StringRef(awrHubAwrSnapshotTimeGreaterThanOrEqualTo),
			TimeLessThanOrEqualTo:       pulumi.StringRef(awrHubAwrSnapshotTimeLessThanOrEqualTo),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testAwrHubAwrSnapshots = Oci.Opsi.GetAwrHubAwrSnapshots.Invoke(new()
    {
        AwrHubId = testAwrHub.Id,
        AwrSourceDatabaseIdentifier = awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
        TimeGreaterThanOrEqualTo = awrHubAwrSnapshotTimeGreaterThanOrEqualTo,
        TimeLessThanOrEqualTo = awrHubAwrSnapshotTimeLessThanOrEqualTo,
    });

});
Copy
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.GetAwrHubAwrSnapshotsArgs;
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 testAwrHubAwrSnapshots = OpsiFunctions.getAwrHubAwrSnapshots(GetAwrHubAwrSnapshotsArgs.builder()
            .awrHubId(testAwrHub.id())
            .awrSourceDatabaseIdentifier(awrHubAwrSnapshotAwrSourceDatabaseIdentifier)
            .timeGreaterThanOrEqualTo(awrHubAwrSnapshotTimeGreaterThanOrEqualTo)
            .timeLessThanOrEqualTo(awrHubAwrSnapshotTimeLessThanOrEqualTo)
            .build());

    }
}
Copy
variables:
  testAwrHubAwrSnapshots:
    fn::invoke:
      function: oci:Opsi:getAwrHubAwrSnapshots
      arguments:
        awrHubId: ${testAwrHub.id}
        awrSourceDatabaseIdentifier: ${awrHubAwrSnapshotAwrSourceDatabaseIdentifier}
        timeGreaterThanOrEqualTo: ${awrHubAwrSnapshotTimeGreaterThanOrEqualTo}
        timeLessThanOrEqualTo: ${awrHubAwrSnapshotTimeLessThanOrEqualTo}
Copy

Using getAwrHubAwrSnapshots

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 getAwrHubAwrSnapshots(args: GetAwrHubAwrSnapshotsArgs, opts?: InvokeOptions): Promise<GetAwrHubAwrSnapshotsResult>
function getAwrHubAwrSnapshotsOutput(args: GetAwrHubAwrSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetAwrHubAwrSnapshotsResult>
Copy
def get_awr_hub_awr_snapshots(awr_hub_id: Optional[str] = None,
                              awr_source_database_identifier: Optional[str] = None,
                              filters: Optional[Sequence[_opsi.GetAwrHubAwrSnapshotsFilter]] = None,
                              time_greater_than_or_equal_to: Optional[str] = None,
                              time_less_than_or_equal_to: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAwrHubAwrSnapshotsResult
def get_awr_hub_awr_snapshots_output(awr_hub_id: Optional[pulumi.Input[str]] = None,
                              awr_source_database_identifier: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_opsi.GetAwrHubAwrSnapshotsFilterArgs]]]] = 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[GetAwrHubAwrSnapshotsResult]
Copy
func GetAwrHubAwrSnapshots(ctx *Context, args *GetAwrHubAwrSnapshotsArgs, opts ...InvokeOption) (*GetAwrHubAwrSnapshotsResult, error)
func GetAwrHubAwrSnapshotsOutput(ctx *Context, args *GetAwrHubAwrSnapshotsOutputArgs, opts ...InvokeOption) GetAwrHubAwrSnapshotsResultOutput
Copy

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

public static class GetAwrHubAwrSnapshots 
{
    public static Task<GetAwrHubAwrSnapshotsResult> InvokeAsync(GetAwrHubAwrSnapshotsArgs args, InvokeOptions? opts = null)
    public static Output<GetAwrHubAwrSnapshotsResult> Invoke(GetAwrHubAwrSnapshotsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAwrHubAwrSnapshotsResult> getAwrHubAwrSnapshots(GetAwrHubAwrSnapshotsArgs args, InvokeOptions options)
public static Output<GetAwrHubAwrSnapshotsResult> getAwrHubAwrSnapshots(GetAwrHubAwrSnapshotsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Opsi/getAwrHubAwrSnapshots:getAwrHubAwrSnapshots
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AwrHubId This property is required. string
Unique Awr Hub identifier
AwrSourceDatabaseIdentifier This property is required. string
AWR source database identifier.
Filters Changes to this property will trigger replacement. List<GetAwrHubAwrSnapshotsFilter>
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 This property is required. string
Unique Awr Hub identifier
AwrSourceDatabaseIdentifier This property is required. string
AWR source database identifier.
Filters Changes to this property will trigger replacement. []GetAwrHubAwrSnapshotsFilter
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 This property is required. String
Unique Awr Hub identifier
awrSourceDatabaseIdentifier This property is required. String
AWR source database identifier.
filters Changes to this property will trigger replacement. List<GetAwrHubAwrSnapshotsFilter>
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 This property is required. string
Unique Awr Hub identifier
awrSourceDatabaseIdentifier This property is required. string
AWR source database identifier.
filters Changes to this property will trigger replacement. GetAwrHubAwrSnapshotsFilter[]
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 This property is required. str
Unique Awr Hub identifier
awr_source_database_identifier This property is required. str
AWR source database identifier.
filters Changes to this property will trigger replacement. Sequence[opsi.GetAwrHubAwrSnapshotsFilter]
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 This property is required. String
Unique Awr Hub identifier
awrSourceDatabaseIdentifier This property is required. String
AWR source database identifier.
filters Changes to this property will trigger replacement. List<Property Map>
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

getAwrHubAwrSnapshots Result

The following output properties are available:

AwrHubId string
AwrSnapshotCollections List<GetAwrHubAwrSnapshotsAwrSnapshotCollection>
The list of awr_snapshot_collection.
AwrSourceDatabaseIdentifier string
Id string
The provider-assigned unique ID for this managed resource.
Filters List<GetAwrHubAwrSnapshotsFilter>
TimeGreaterThanOrEqualTo string
TimeLessThanOrEqualTo string
AwrHubId string
AwrSnapshotCollections []GetAwrHubAwrSnapshotsAwrSnapshotCollection
The list of awr_snapshot_collection.
AwrSourceDatabaseIdentifier string
Id string
The provider-assigned unique ID for this managed resource.
Filters []GetAwrHubAwrSnapshotsFilter
TimeGreaterThanOrEqualTo string
TimeLessThanOrEqualTo string
awrHubId String
awrSnapshotCollections List<GetAwrHubAwrSnapshotsAwrSnapshotCollection>
The list of awr_snapshot_collection.
awrSourceDatabaseIdentifier String
id String
The provider-assigned unique ID for this managed resource.
filters List<GetAwrHubAwrSnapshotsFilter>
timeGreaterThanOrEqualTo String
timeLessThanOrEqualTo String
awrHubId string
awrSnapshotCollections GetAwrHubAwrSnapshotsAwrSnapshotCollection[]
The list of awr_snapshot_collection.
awrSourceDatabaseIdentifier string
id string
The provider-assigned unique ID for this managed resource.
filters GetAwrHubAwrSnapshotsFilter[]
timeGreaterThanOrEqualTo string
timeLessThanOrEqualTo string
awrHubId String
awrSnapshotCollections List<Property Map>
The list of awr_snapshot_collection.
awrSourceDatabaseIdentifier String
id String
The provider-assigned unique ID for this managed resource.
filters List<Property Map>
timeGreaterThanOrEqualTo String
timeLessThanOrEqualTo String

Supporting Types

GetAwrHubAwrSnapshotsAwrSnapshotCollection

Items This property is required. List<GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem>
A list of AWR snapshot summary data.
Items This property is required. []GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem
A list of AWR snapshot summary data.
items This property is required. List<GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem>
A list of AWR snapshot summary data.
items This property is required. GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem[]
A list of AWR snapshot summary data.
items This property is required. Sequence[opsi.GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem]
A list of AWR snapshot summary data.
items This property is required. List<Property Map>
A list of AWR snapshot summary data.

GetAwrHubAwrSnapshotsAwrSnapshotCollectionItem

Items This property is required. List<GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem>
A list of AWR snapshot summary data.
Items This property is required. []GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem
A list of AWR snapshot summary data.
items This property is required. List<GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem>
A list of AWR snapshot summary data.
items This property is required. GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem[]
A list of AWR snapshot summary data.
items This property is required. Sequence[opsi.GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem]
A list of AWR snapshot summary data.
items This property is required. List<Property Map>
A list of AWR snapshot summary data.

GetAwrHubAwrSnapshotsAwrSnapshotCollectionItemItem

AwrSourceDatabaseId This property is required. string
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
ErrorCount This property is required. string
The total number of errors.
InstanceNumber This property is required. int
The database instance number.
SnapshotIdentifier This property is required. int
The identifier of the snapshot.
TimeDbStartup This property is required. string
The timestamp of the database startup.
TimeSnapshotBegin This property is required. string
The start time of the snapshot.
TimeSnapshotEnd This property is required. string
The end time of the snapshot.
AwrSourceDatabaseId This property is required. string
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
ErrorCount This property is required. string
The total number of errors.
InstanceNumber This property is required. int
The database instance number.
SnapshotIdentifier This property is required. int
The identifier of the snapshot.
TimeDbStartup This property is required. string
The timestamp of the database startup.
TimeSnapshotBegin This property is required. string
The start time of the snapshot.
TimeSnapshotEnd This property is required. string
The end time of the snapshot.
awrSourceDatabaseId This property is required. String
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
errorCount This property is required. String
The total number of errors.
instanceNumber This property is required. Integer
The database instance number.
snapshotIdentifier This property is required. Integer
The identifier of the snapshot.
timeDbStartup This property is required. String
The timestamp of the database startup.
timeSnapshotBegin This property is required. String
The start time of the snapshot.
timeSnapshotEnd This property is required. String
The end time of the snapshot.
awrSourceDatabaseId This property is required. string
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
errorCount This property is required. string
The total number of errors.
instanceNumber This property is required. number
The database instance number.
snapshotIdentifier This property is required. number
The identifier of the snapshot.
timeDbStartup This property is required. string
The timestamp of the database startup.
timeSnapshotBegin This property is required. string
The start time of the snapshot.
timeSnapshotEnd This property is required. string
The end time of the snapshot.
awr_source_database_id This property is required. str
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
error_count This property is required. str
The total number of errors.
instance_number This property is required. int
The database instance number.
snapshot_identifier This property is required. int
The identifier of the snapshot.
time_db_startup This property is required. str
The timestamp of the database startup.
time_snapshot_begin This property is required. str
The start time of the snapshot.
time_snapshot_end This property is required. str
The end time of the snapshot.
awrSourceDatabaseId This property is required. String
DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
errorCount This property is required. String
The total number of errors.
instanceNumber This property is required. Number
The database instance number.
snapshotIdentifier This property is required. Number
The identifier of the snapshot.
timeDbStartup This property is required. String
The timestamp of the database startup.
timeSnapshotBegin This property is required. String
The start time of the snapshot.
timeSnapshotEnd This property is required. String
The end time of the snapshot.

GetAwrHubAwrSnapshotsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi