Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Opsi.getNewsReports
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of News Reports in Oracle Cloud Infrastructure Opsi service.
Gets a list of news reports based on the query parameters specified. Either compartmentId or id query parameter must be specified.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNewsReports = oci.Opsi.getNewsReports({
compartmentId: compartmentId,
compartmentIdInSubtree: newsReportCompartmentIdInSubtree,
newsReportId: testNewsReport.id,
states: newsReportState,
statuses: newsReportStatus,
});
import pulumi
import pulumi_oci as oci
test_news_reports = oci.Opsi.get_news_reports(compartment_id=compartment_id,
compartment_id_in_subtree=news_report_compartment_id_in_subtree,
news_report_id=test_news_report["id"],
states=news_report_state,
statuses=news_report_status)
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.GetNewsReports(ctx, &opsi.GetNewsReportsArgs{
CompartmentId: pulumi.StringRef(compartmentId),
CompartmentIdInSubtree: pulumi.BoolRef(newsReportCompartmentIdInSubtree),
NewsReportId: pulumi.StringRef(testNewsReport.Id),
States: newsReportState,
Statuses: newsReportStatus,
}, 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 testNewsReports = Oci.Opsi.GetNewsReports.Invoke(new()
{
CompartmentId = compartmentId,
CompartmentIdInSubtree = newsReportCompartmentIdInSubtree,
NewsReportId = testNewsReport.Id,
States = newsReportState,
Statuses = newsReportStatus,
});
});
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.GetNewsReportsArgs;
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 testNewsReports = OpsiFunctions.getNewsReports(GetNewsReportsArgs.builder()
.compartmentId(compartmentId)
.compartmentIdInSubtree(newsReportCompartmentIdInSubtree)
.newsReportId(testNewsReport.id())
.states(newsReportState)
.statuses(newsReportStatus)
.build());
}
}
variables:
testNewsReports:
fn::invoke:
Function: oci:Opsi:getNewsReports
Arguments:
compartmentId: ${compartmentId}
compartmentIdInSubtree: ${newsReportCompartmentIdInSubtree}
newsReportId: ${testNewsReport.id}
states: ${newsReportState}
statuses: ${newsReportStatus}
Using getNewsReports
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 getNewsReports(args: GetNewsReportsArgs, opts?: InvokeOptions): Promise<GetNewsReportsResult>
function getNewsReportsOutput(args: GetNewsReportsOutputArgs, opts?: InvokeOptions): Output<GetNewsReportsResult>
def get_news_reports(compartment_id: Optional[str] = None,
compartment_id_in_subtree: Optional[bool] = None,
filters: Optional[Sequence[_opsi.GetNewsReportsFilter]] = None,
news_report_id: Optional[str] = None,
states: Optional[Sequence[str]] = None,
statuses: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetNewsReportsResult
def get_news_reports_output(compartment_id: Optional[pulumi.Input[str]] = None,
compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_opsi.GetNewsReportsFilterArgs]]]] = None,
news_report_id: Optional[pulumi.Input[str]] = None,
states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNewsReportsResult]
func GetNewsReports(ctx *Context, args *GetNewsReportsArgs, opts ...InvokeOption) (*GetNewsReportsResult, error)
func GetNewsReportsOutput(ctx *Context, args *GetNewsReportsOutputArgs, opts ...InvokeOption) GetNewsReportsResultOutput
> Note: This function is named GetNewsReports
in the Go SDK.
public static class GetNewsReports
{
public static Task<GetNewsReportsResult> InvokeAsync(GetNewsReportsArgs args, InvokeOptions? opts = null)
public static Output<GetNewsReportsResult> Invoke(GetNewsReportsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNewsReportsResult> getNewsReports(GetNewsReportsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Opsi/getNewsReports:getNewsReports
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Compartment
Id boolIn Subtree - A flag to search all resources within a given compartment and all sub-compartments.
- Filters
List<Get
News Reports Filter> - News
Report stringId - Unique Operations Insights news report identifier
- States List<string>
- Lifecycle states
- Statuses List<string>
- Resource Status
- Compartment
Id string - The OCID of the compartment.
- Compartment
Id boolIn Subtree - A flag to search all resources within a given compartment and all sub-compartments.
- Filters
[]Get
News Reports Filter - News
Report stringId - Unique Operations Insights news report identifier
- States []string
- Lifecycle states
- Statuses []string
- Resource Status
- compartment
Id String - The OCID of the compartment.
- compartment
Id BooleanIn Subtree - A flag to search all resources within a given compartment and all sub-compartments.
- filters
List<Get
News Reports Filter> - news
Report StringId - Unique Operations Insights news report identifier
- states List<String>
- Lifecycle states
- statuses List<String>
- Resource Status
- compartment
Id string - The OCID of the compartment.
- compartment
Id booleanIn Subtree - A flag to search all resources within a given compartment and all sub-compartments.
- filters
Get
News Reports Filter[] - news
Report stringId - Unique Operations Insights news report identifier
- states string[]
- Lifecycle states
- statuses string[]
- Resource Status
- compartment_
id str - The OCID of the compartment.
- compartment_
id_ boolin_ subtree - A flag to search all resources within a given compartment and all sub-compartments.
- filters
Sequence[opsi.
Get News Reports Filter] - news_
report_ strid - Unique Operations Insights news report identifier
- states Sequence[str]
- Lifecycle states
- statuses Sequence[str]
- Resource Status
- compartment
Id String - The OCID of the compartment.
- compartment
Id BooleanIn Subtree - A flag to search all resources within a given compartment and all sub-compartments.
- filters List<Property Map>
- news
Report StringId - Unique Operations Insights news report identifier
- states List<String>
- Lifecycle states
- statuses List<String>
- Resource Status
getNewsReports Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- News
Report List<GetCollections News Reports News Report Collection> - The list of news_report_collection.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Id boolIn Subtree - Filters
List<Get
News Reports Filter> - News
Report stringId - States List<string>
- The current state of the news report.
- Statuses List<string>
- Indicates the status of a news report in Operations Insights.
- Id string
- The provider-assigned unique ID for this managed resource.
- News
Report []GetCollections News Reports News Report Collection - The list of news_report_collection.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Id boolIn Subtree - Filters
[]Get
News Reports Filter - News
Report stringId - States []string
- The current state of the news report.
- Statuses []string
- Indicates the status of a news report in Operations Insights.
- id String
- The provider-assigned unique ID for this managed resource.
- news
Report List<GetCollections News Reports News Report Collection> - The list of news_report_collection.
- compartment
Id String - The OCID of the compartment.
- compartment
Id BooleanIn Subtree - filters
List<Get
News Reports Filter> - news
Report StringId - states List<String>
- The current state of the news report.
- statuses List<String>
- Indicates the status of a news report in Operations Insights.
- id string
- The provider-assigned unique ID for this managed resource.
- news
Report GetCollections News Reports News Report Collection[] - The list of news_report_collection.
- compartment
Id string - The OCID of the compartment.
- compartment
Id booleanIn Subtree - filters
Get
News Reports Filter[] - news
Report stringId - states string[]
- The current state of the news report.
- statuses string[]
- Indicates the status of a news report in Operations Insights.
- id str
- The provider-assigned unique ID for this managed resource.
- news_
report_ Sequence[opsi.collections Get News Reports News Report Collection] - The list of news_report_collection.
- compartment_
id str - The OCID of the compartment.
- compartment_
id_ boolin_ subtree - filters
Sequence[opsi.
Get News Reports Filter] - news_
report_ strid - states Sequence[str]
- The current state of the news report.
- statuses Sequence[str]
- Indicates the status of a news report in Operations Insights.
- id String
- The provider-assigned unique ID for this managed resource.
- news
Report List<Property Map>Collections - The list of news_report_collection.
- compartment
Id String - The OCID of the compartment.
- compartment
Id BooleanIn Subtree - filters List<Property Map>
- news
Report StringId - states List<String>
- The current state of the news report.
- statuses List<String>
- Indicates the status of a news report in Operations Insights.
Supporting Types
GetNewsReportsFilter
GetNewsReportsNewsReportCollection
GetNewsReportsNewsReportCollectionItem
- Are
Child boolCompartments Included - A flag to consider the resources within a given compartment and all sub-compartments.
- Compartment
Id string - The OCID of the compartment.
- Content
Types List<GetNews Reports News Report Collection Item Content Type> - Content types that the news report can handle.
- Day
Of stringWeek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- Dictionary<string, object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- The description of the news report.
- Dictionary<string, object>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Id string
- The OCID of the news report resource.
- Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- Locale string
- Language of the news report.
- Name string
- The news report name.
- News
Frequency string - News report frequency.
- Ons
Topic stringId - The OCID of the ONS topic.
- State string
- Lifecycle states
- Status string
- Resource Status
- Dictionary<string, object>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- Time
Updated string - The time the news report was updated. An RFC3339 formatted datetime string.
- Are
Child boolCompartments Included - A flag to consider the resources within a given compartment and all sub-compartments.
- Compartment
Id string - The OCID of the compartment.
- Content
Types []GetNews Reports News Report Collection Item Content Type - Content types that the news report can handle.
- Day
Of stringWeek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- map[string]interface{}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- The description of the news report.
- map[string]interface{}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Id string
- The OCID of the news report resource.
- Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- Locale string
- Language of the news report.
- Name string
- The news report name.
- News
Frequency string - News report frequency.
- Ons
Topic stringId - The OCID of the ONS topic.
- State string
- Lifecycle states
- Status string
- Resource Status
- map[string]interface{}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- Time
Updated string - The time the news report was updated. An RFC3339 formatted datetime string.
- are
Child BooleanCompartments Included - A flag to consider the resources within a given compartment and all sub-compartments.
- compartment
Id String - The OCID of the compartment.
- content
Types List<GetNews Reports News Report Collection Item Content Type> - Content types that the news report can handle.
- day
Of StringWeek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- Map<String,Object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- The description of the news report.
- Map<String,Object>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id String
- The OCID of the news report resource.
- lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- locale String
- Language of the news report.
- name String
- The news report name.
- news
Frequency String - News report frequency.
- ons
Topic StringId - The OCID of the ONS topic.
- state String
- Lifecycle states
- status String
- Resource Status
- Map<String,Object>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- time
Updated String - The time the news report was updated. An RFC3339 formatted datetime string.
- are
Child booleanCompartments Included - A flag to consider the resources within a given compartment and all sub-compartments.
- compartment
Id string - The OCID of the compartment.
- content
Types GetNews Reports News Report Collection Item Content Type[] - Content types that the news report can handle.
- day
Of stringWeek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- {[key: string]: any}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- The description of the news report.
- {[key: string]: any}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id string
- The OCID of the news report resource.
- lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- locale string
- Language of the news report.
- name string
- The news report name.
- news
Frequency string - News report frequency.
- ons
Topic stringId - The OCID of the ONS topic.
- state string
- Lifecycle states
- status string
- Resource Status
- {[key: string]: any}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- time
Updated string - The time the news report was updated. An RFC3339 formatted datetime string.
- are_
child_ boolcompartments_ included - A flag to consider the resources within a given compartment and all sub-compartments.
- compartment_
id str - The OCID of the compartment.
- content_
types Sequence[opsi.Get News Reports News Report Collection Item Content Type] - Content types that the news report can handle.
- day_
of_ strweek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- Mapping[str, Any]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- The description of the news report.
- Mapping[str, Any]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id str
- The OCID of the news report resource.
- lifecycle_
details str - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- locale str
- Language of the news report.
- name str
- The news report name.
- news_
frequency str - News report frequency.
- ons_
topic_ strid - The OCID of the ONS topic.
- state str
- Lifecycle states
- status str
- Resource Status
- Mapping[str, Any]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- time_
updated str - The time the news report was updated. An RFC3339 formatted datetime string.
- are
Child BooleanCompartments Included - A flag to consider the resources within a given compartment and all sub-compartments.
- compartment
Id String - The OCID of the compartment.
- content
Types List<Property Map> - Content types that the news report can handle.
- day
Of StringWeek - Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
- Map<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- The description of the news report.
- Map<Any>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id String
- The OCID of the news report resource.
- lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- locale String
- Language of the news report.
- name String
- The news report name.
- news
Frequency String - News report frequency.
- ons
Topic StringId - The OCID of the ONS topic.
- state String
- Lifecycle states
- status String
- Resource Status
- Map<Any>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time the the news report was first enabled. An RFC3339 formatted datetime string.
- time
Updated String - The time the news report was updated. An RFC3339 formatted datetime string.
GetNewsReportsNewsReportCollectionItemContentType
- Capacity
Planning List<string>Resources - Supported resources for capacity planning content type.
- Sql
Insights List<string>Fleet Analysis Resources - Supported resources for SQL insights - fleet analysis content type.
- Sql
Insights List<string>Performance Degradation Resources - Supported resources for SQL insights - performance degradation content type.
- Sql
Insights List<string>Plan Changes Resources - Supported resources for SQL insights - plan changes content type.
- Sql
Insights List<string>Top Databases Resources - Supported resources for SQL insights - top databases content type.
- Sql
Insights List<string>Top Sql By Insights Resources - Supported resources for SQL insights - top SQL by insights content type.
- Sql
Insights List<string>Top Sql Resources - Supported resources for SQL insights - top SQL content type.
- Capacity
Planning []stringResources - Supported resources for capacity planning content type.
- Sql
Insights []stringFleet Analysis Resources - Supported resources for SQL insights - fleet analysis content type.
- Sql
Insights []stringPerformance Degradation Resources - Supported resources for SQL insights - performance degradation content type.
- Sql
Insights []stringPlan Changes Resources - Supported resources for SQL insights - plan changes content type.
- Sql
Insights []stringTop Databases Resources - Supported resources for SQL insights - top databases content type.
- Sql
Insights []stringTop Sql By Insights Resources - Supported resources for SQL insights - top SQL by insights content type.
- Sql
Insights []stringTop Sql Resources - Supported resources for SQL insights - top SQL content type.
- capacity
Planning List<String>Resources - Supported resources for capacity planning content type.
- sql
Insights List<String>Fleet Analysis Resources - Supported resources for SQL insights - fleet analysis content type.
- sql
Insights List<String>Performance Degradation Resources - Supported resources for SQL insights - performance degradation content type.
- sql
Insights List<String>Plan Changes Resources - Supported resources for SQL insights - plan changes content type.
- sql
Insights List<String>Top Databases Resources - Supported resources for SQL insights - top databases content type.
- sql
Insights List<String>Top Sql By Insights Resources - Supported resources for SQL insights - top SQL by insights content type.
- sql
Insights List<String>Top Sql Resources - Supported resources for SQL insights - top SQL content type.
- capacity
Planning string[]Resources - Supported resources for capacity planning content type.
- sql
Insights string[]Fleet Analysis Resources - Supported resources for SQL insights - fleet analysis content type.
- sql
Insights string[]Performance Degradation Resources - Supported resources for SQL insights - performance degradation content type.
- sql
Insights string[]Plan Changes Resources - Supported resources for SQL insights - plan changes content type.
- sql
Insights string[]Top Databases Resources - Supported resources for SQL insights - top databases content type.
- sql
Insights string[]Top Sql By Insights Resources - Supported resources for SQL insights - top SQL by insights content type.
- sql
Insights string[]Top Sql Resources - Supported resources for SQL insights - top SQL content type.
- capacity_
planning_ Sequence[str]resources - Supported resources for capacity planning content type.
- sql_
insights_ Sequence[str]fleet_ analysis_ resources - Supported resources for SQL insights - fleet analysis content type.
- sql_
insights_ Sequence[str]performance_ degradation_ resources - Supported resources for SQL insights - performance degradation content type.
- sql_
insights_ Sequence[str]plan_ changes_ resources - Supported resources for SQL insights - plan changes content type.
- sql_
insights_ Sequence[str]top_ databases_ resources - Supported resources for SQL insights - top databases content type.
- sql_
insights_ Sequence[str]top_ sql_ by_ insights_ resources - Supported resources for SQL insights - top SQL by insights content type.
- sql_
insights_ Sequence[str]top_ sql_ resources - Supported resources for SQL insights - top SQL content type.
- capacity
Planning List<String>Resources - Supported resources for capacity planning content type.
- sql
Insights List<String>Fleet Analysis Resources - Supported resources for SQL insights - fleet analysis content type.
- sql
Insights List<String>Performance Degradation Resources - Supported resources for SQL insights - performance degradation content type.
- sql
Insights List<String>Plan Changes Resources - Supported resources for SQL insights - plan changes content type.
- sql
Insights List<String>Top Databases Resources - Supported resources for SQL insights - top databases content type.
- sql
Insights List<String>Top Sql By Insights Resources - Supported resources for SQL insights - top SQL by insights content type.
- sql
Insights List<String>Top Sql Resources - Supported resources for SQL insights - top SQL content type.
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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi