oci.Opsi.getAwrHubAwrSnapshot
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAwrHubAwrSnapshot = oci.Opsi.getAwrHubAwrSnapshot({
awrHubId: testAwrHub.id,
awrSourceDatabaseIdentifier: awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
timeGreaterThanOrEqualTo: awrHubAwrSnapshotTimeGreaterThanOrEqualTo,
timeLessThanOrEqualTo: awrHubAwrSnapshotTimeLessThanOrEqualTo,
});
import pulumi
import pulumi_oci as oci
test_awr_hub_awr_snapshot = oci.Opsi.get_awr_hub_awr_snapshot(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)
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.GetAwrHubAwrSnapshot(ctx, &opsi.GetAwrHubAwrSnapshotArgs{
AwrHubId: testAwrHub.Id,
AwrSourceDatabaseIdentifier: awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
TimeGreaterThanOrEqualTo: pulumi.StringRef(awrHubAwrSnapshotTimeGreaterThanOrEqualTo),
TimeLessThanOrEqualTo: pulumi.StringRef(awrHubAwrSnapshotTimeLessThanOrEqualTo),
}, 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 testAwrHubAwrSnapshot = Oci.Opsi.GetAwrHubAwrSnapshot.Invoke(new()
{
AwrHubId = testAwrHub.Id,
AwrSourceDatabaseIdentifier = awrHubAwrSnapshotAwrSourceDatabaseIdentifier,
TimeGreaterThanOrEqualTo = awrHubAwrSnapshotTimeGreaterThanOrEqualTo,
TimeLessThanOrEqualTo = awrHubAwrSnapshotTimeLessThanOrEqualTo,
});
});
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(testAwrHub.id())
.awrSourceDatabaseIdentifier(awrHubAwrSnapshotAwrSourceDatabaseIdentifier)
.timeGreaterThanOrEqualTo(awrHubAwrSnapshotTimeGreaterThanOrEqualTo)
.timeLessThanOrEqualTo(awrHubAwrSnapshotTimeLessThanOrEqualTo)
.build());
}
}
variables:
testAwrHubAwrSnapshot:
fn::invoke:
Function: oci:Opsi:getAwrHubAwrSnapshot
Arguments:
awrHubId: ${testAwrHub.id}
awrSourceDatabaseIdentifier: ${awrHubAwrSnapshotAwrSourceDatabaseIdentifier}
timeGreaterThanOrEqualTo: ${awrHubAwrSnapshotTimeGreaterThanOrEqualTo}
timeLessThanOrEqualTo: ${awrHubAwrSnapshotTimeLessThanOrEqualTo}
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:
- Awr
Hub stringId - Unique Awr Hub identifier
- Awr
Source stringDatabase Identifier - AWR source database identifier.
- Time
Greater stringThan Or Equal To - 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 stringThan Or Equal To - 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 stringId - Unique Awr Hub identifier
- Awr
Source stringDatabase Identifier - AWR source database identifier.
- Time
Greater stringThan Or Equal To - 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 stringThan Or Equal To - 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 StringId - Unique Awr Hub identifier
- awr
Source StringDatabase Identifier - AWR source database identifier.
- time
Greater StringThan Or Equal To - 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 StringThan Or Equal To - 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 stringId - Unique Awr Hub identifier
- awr
Source stringDatabase Identifier - AWR source database identifier.
- time
Greater stringThan Or Equal To - 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 stringThan Or Equal To - 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_ strid - Unique Awr Hub identifier
- awr_
source_ strdatabase_ identifier - AWR source database identifier.
- time_
greater_ strthan_ or_ equal_ to - 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_ strthan_ or_ equal_ to - 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 StringId - Unique Awr Hub identifier
- awr
Source StringDatabase Identifier - AWR source database identifier.
- time
Greater StringThan Or Equal To - 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 StringThan Or Equal To - 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:
- Awr
Hub stringId - Awr
Source stringDatabase Identifier - Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Awr Hub Awr Snapshot Item> - A list of AWR snapshot summary data.
- Time
Greater stringThan Or Equal To - Time
Less stringThan Or Equal To
- Awr
Hub stringId - Awr
Source stringDatabase Identifier - Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Awr Hub Awr Snapshot Item - A list of AWR snapshot summary data.
- Time
Greater stringThan Or Equal To - Time
Less stringThan Or Equal To
- awr
Hub StringId - awr
Source StringDatabase Identifier - id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Awr Hub Awr Snapshot Item> - A list of AWR snapshot summary data.
- time
Greater StringThan Or Equal To - time
Less StringThan Or Equal To
- awr
Hub stringId - awr
Source stringDatabase Identifier - id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Awr Hub Awr Snapshot Item[] - A list of AWR snapshot summary data.
- time
Greater stringThan Or Equal To - time
Less stringThan Or Equal To
- awr_
hub_ strid - awr_
source_ strdatabase_ identifier - id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[opsi.
Get Awr Hub Awr Snapshot Item] - A list of AWR snapshot summary data.
- time_
greater_ strthan_ or_ equal_ to - time_
less_ strthan_ or_ equal_ to
- awr
Hub StringId - awr
Source StringDatabase Identifier - id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- A list of AWR snapshot summary data.
- time
Greater StringThan Or Equal To - time
Less StringThan Or Equal To
Supporting Types
GetAwrHubAwrSnapshotItem
- Awr
Source stringDatabase Id - DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
- Error
Count string - The total number of errors.
- Instance
Number int - The database instance number.
- Snapshot
Identifier int - The identifier of the snapshot.
- Time
Db stringStartup - The timestamp of the database startup.
- Time
Snapshot stringBegin - The start time of the snapshot.
- Time
Snapshot stringEnd - The end time of the snapshot.
- Awr
Source stringDatabase Id - DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
- Error
Count string - The total number of errors.
- Instance
Number int - The database instance number.
- Snapshot
Identifier int - The identifier of the snapshot.
- Time
Db stringStartup - The timestamp of the database startup.
- Time
Snapshot stringBegin - The start time of the snapshot.
- Time
Snapshot stringEnd - The end time of the snapshot.
- awr
Source StringDatabase Id - DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
- error
Count String - The total number of errors.
- instance
Number Integer - The database instance number.
- snapshot
Identifier Integer - The identifier of the snapshot.
- time
Db StringStartup - The timestamp of the database startup.
- time
Snapshot StringBegin - The start time of the snapshot.
- time
Snapshot StringEnd - The end time of the snapshot.
- awr
Source stringDatabase Id - DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
- error
Count string - The total number of errors.
- instance
Number number - The database instance number.
- snapshot
Identifier number - The identifier of the snapshot.
- time
Db stringStartup - The timestamp of the database startup.
- time
Snapshot stringBegin - The start time of the snapshot.
- time
Snapshot stringEnd - The end time of the snapshot.
- awr_
source_ strdatabase_ id - 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_ strstartup - The timestamp of the database startup.
- time_
snapshot_ strbegin - The start time of the snapshot.
- time_
snapshot_ strend - The end time of the snapshot.
- awr
Source StringDatabase Id - DatabaseId of the Source database for which AWR Data will be uploaded to AWR Hub.
- error
Count String - The total number of errors.
- instance
Number Number - The database instance number.
- snapshot
Identifier Number - The identifier of the snapshot.
- time
Db StringStartup - The timestamp of the database startup.
- time
Snapshot StringBegin - The start time of the snapshot.
- time
Snapshot StringEnd - 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.