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

oci.Opsi.getNewsReports

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 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:

    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    Filters List<GetNewsReportsFilter>
    NewsReportId string
    Unique Operations Insights news report identifier
    States List<string>
    Lifecycle states
    Statuses List<string>
    Resource Status
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    Filters []GetNewsReportsFilter
    NewsReportId string
    Unique Operations Insights news report identifier
    States []string
    Lifecycle states
    Statuses []string
    Resource Status
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters List<GetNewsReportsFilter>
    newsReportId String
    Unique Operations Insights news report identifier
    states List<String>
    Lifecycle states
    statuses List<String>
    Resource Status
    compartmentId string
    The OCID of the compartment.
    compartmentIdInSubtree boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters GetNewsReportsFilter[]
    newsReportId string
    Unique Operations Insights news report identifier
    states string[]
    Lifecycle states
    statuses string[]
    Resource Status
    compartment_id str
    The OCID of the compartment.
    compartment_id_in_subtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    filters Sequence[opsi.GetNewsReportsFilter]
    news_report_id str
    Unique Operations Insights news report identifier
    states Sequence[str]
    Lifecycle states
    statuses Sequence[str]
    Resource Status
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters List<Property Map>
    newsReportId String
    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.
    NewsReportCollections List<GetNewsReportsNewsReportCollection>
    The list of news_report_collection.
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    Filters List<GetNewsReportsFilter>
    NewsReportId string
    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.
    NewsReportCollections []GetNewsReportsNewsReportCollection
    The list of news_report_collection.
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    Filters []GetNewsReportsFilter
    NewsReportId string
    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.
    newsReportCollections List<GetNewsReportsNewsReportCollection>
    The list of news_report_collection.
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    filters List<GetNewsReportsFilter>
    newsReportId String
    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.
    newsReportCollections GetNewsReportsNewsReportCollection[]
    The list of news_report_collection.
    compartmentId string
    The OCID of the compartment.
    compartmentIdInSubtree boolean
    filters GetNewsReportsFilter[]
    newsReportId string
    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_collections Sequence[opsi.GetNewsReportsNewsReportCollection]
    The list of news_report_collection.
    compartment_id str
    The OCID of the compartment.
    compartment_id_in_subtree bool
    filters Sequence[opsi.GetNewsReportsFilter]
    news_report_id str
    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.
    newsReportCollections List<Property Map>
    The list of news_report_collection.
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    filters List<Property Map>
    newsReportId String
    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

    Name string
    The news report name.
    Values List<string>
    Regex bool
    Name string
    The news report name.
    Values []string
    Regex bool
    name String
    The news report name.
    values List<String>
    regex Boolean
    name string
    The news report name.
    values string[]
    regex boolean
    name str
    The news report name.
    values Sequence[str]
    regex bool
    name String
    The news report name.
    values List<String>
    regex Boolean

    GetNewsReportsNewsReportCollection

    GetNewsReportsNewsReportCollectionItem

    AreChildCompartmentsIncluded bool
    A flag to consider the resources within a given compartment and all sub-compartments.
    CompartmentId string
    The OCID of the compartment.
    ContentTypes List<GetNewsReportsNewsReportCollectionItemContentType>
    Content types that the news report can handle.
    DayOfWeek string
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    DefinedTags 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.
    FreeformTags 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.
    LifecycleDetails 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.
    NewsFrequency string
    News report frequency.
    OnsTopicId string
    The OCID of the ONS topic.
    State string
    Lifecycle states
    Status string
    Resource Status
    SystemTags Dictionary<string, object>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time the the news report was first enabled. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the news report was updated. An RFC3339 formatted datetime string.
    AreChildCompartmentsIncluded bool
    A flag to consider the resources within a given compartment and all sub-compartments.
    CompartmentId string
    The OCID of the compartment.
    ContentTypes []GetNewsReportsNewsReportCollectionItemContentType
    Content types that the news report can handle.
    DayOfWeek string
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    DefinedTags 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.
    FreeformTags 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.
    LifecycleDetails 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.
    NewsFrequency string
    News report frequency.
    OnsTopicId string
    The OCID of the ONS topic.
    State string
    Lifecycle states
    Status string
    Resource Status
    SystemTags map[string]interface{}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time the the news report was first enabled. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the news report was updated. An RFC3339 formatted datetime string.
    areChildCompartmentsIncluded Boolean
    A flag to consider the resources within a given compartment and all sub-compartments.
    compartmentId String
    The OCID of the compartment.
    contentTypes List<GetNewsReportsNewsReportCollectionItemContentType>
    Content types that the news report can handle.
    dayOfWeek String
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    definedTags 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.
    freeformTags 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.
    lifecycleDetails 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.
    newsFrequency String
    News report frequency.
    onsTopicId String
    The OCID of the ONS topic.
    state String
    Lifecycle states
    status String
    Resource Status
    systemTags Map<String,Object>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time the the news report was first enabled. An RFC3339 formatted datetime string.
    timeUpdated String
    The time the news report was updated. An RFC3339 formatted datetime string.
    areChildCompartmentsIncluded boolean
    A flag to consider the resources within a given compartment and all sub-compartments.
    compartmentId string
    The OCID of the compartment.
    contentTypes GetNewsReportsNewsReportCollectionItemContentType[]
    Content types that the news report can handle.
    dayOfWeek string
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    definedTags {[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.
    freeformTags {[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.
    lifecycleDetails 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.
    newsFrequency string
    News report frequency.
    onsTopicId string
    The OCID of the ONS topic.
    state string
    Lifecycle states
    status string
    Resource Status
    systemTags {[key: string]: any}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time the the news report was first enabled. An RFC3339 formatted datetime string.
    timeUpdated string
    The time the news report was updated. An RFC3339 formatted datetime string.
    are_child_compartments_included bool
    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.GetNewsReportsNewsReportCollectionItemContentType]
    Content types that the news report can handle.
    day_of_week str
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    defined_tags 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.
    freeform_tags 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_id str
    The OCID of the ONS topic.
    state str
    Lifecycle states
    status str
    Resource Status
    system_tags 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.
    areChildCompartmentsIncluded Boolean
    A flag to consider the resources within a given compartment and all sub-compartments.
    compartmentId String
    The OCID of the compartment.
    contentTypes List<Property Map>
    Content types that the news report can handle.
    dayOfWeek String
    Day of the week in which the news report will be sent if the frequency is set to WEEKLY.
    definedTags 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.
    freeformTags 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.
    lifecycleDetails 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.
    newsFrequency String
    News report frequency.
    onsTopicId String
    The OCID of the ONS topic.
    state String
    Lifecycle states
    status String
    Resource Status
    systemTags Map<Any>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time the the news report was first enabled. An RFC3339 formatted datetime string.
    timeUpdated String
    The time the news report was updated. An RFC3339 formatted datetime string.

    GetNewsReportsNewsReportCollectionItemContentType

    CapacityPlanningResources List<string>
    Supported resources for capacity planning content type.
    SqlInsightsFleetAnalysisResources List<string>
    Supported resources for SQL insights - fleet analysis content type.
    SqlInsightsPerformanceDegradationResources List<string>
    Supported resources for SQL insights - performance degradation content type.
    SqlInsightsPlanChangesResources List<string>
    Supported resources for SQL insights - plan changes content type.
    SqlInsightsTopDatabasesResources List<string>
    Supported resources for SQL insights - top databases content type.
    SqlInsightsTopSqlByInsightsResources List<string>
    Supported resources for SQL insights - top SQL by insights content type.
    SqlInsightsTopSqlResources List<string>
    Supported resources for SQL insights - top SQL content type.
    CapacityPlanningResources []string
    Supported resources for capacity planning content type.
    SqlInsightsFleetAnalysisResources []string
    Supported resources for SQL insights - fleet analysis content type.
    SqlInsightsPerformanceDegradationResources []string
    Supported resources for SQL insights - performance degradation content type.
    SqlInsightsPlanChangesResources []string
    Supported resources for SQL insights - plan changes content type.
    SqlInsightsTopDatabasesResources []string
    Supported resources for SQL insights - top databases content type.
    SqlInsightsTopSqlByInsightsResources []string
    Supported resources for SQL insights - top SQL by insights content type.
    SqlInsightsTopSqlResources []string
    Supported resources for SQL insights - top SQL content type.
    capacityPlanningResources List<String>
    Supported resources for capacity planning content type.
    sqlInsightsFleetAnalysisResources List<String>
    Supported resources for SQL insights - fleet analysis content type.
    sqlInsightsPerformanceDegradationResources List<String>
    Supported resources for SQL insights - performance degradation content type.
    sqlInsightsPlanChangesResources List<String>
    Supported resources for SQL insights - plan changes content type.
    sqlInsightsTopDatabasesResources List<String>
    Supported resources for SQL insights - top databases content type.
    sqlInsightsTopSqlByInsightsResources List<String>
    Supported resources for SQL insights - top SQL by insights content type.
    sqlInsightsTopSqlResources List<String>
    Supported resources for SQL insights - top SQL content type.
    capacityPlanningResources string[]
    Supported resources for capacity planning content type.
    sqlInsightsFleetAnalysisResources string[]
    Supported resources for SQL insights - fleet analysis content type.
    sqlInsightsPerformanceDegradationResources string[]
    Supported resources for SQL insights - performance degradation content type.
    sqlInsightsPlanChangesResources string[]
    Supported resources for SQL insights - plan changes content type.
    sqlInsightsTopDatabasesResources string[]
    Supported resources for SQL insights - top databases content type.
    sqlInsightsTopSqlByInsightsResources string[]
    Supported resources for SQL insights - top SQL by insights content type.
    sqlInsightsTopSqlResources string[]
    Supported resources for SQL insights - top SQL content type.
    capacity_planning_resources Sequence[str]
    Supported resources for capacity planning content type.
    sql_insights_fleet_analysis_resources Sequence[str]
    Supported resources for SQL insights - fleet analysis content type.
    sql_insights_performance_degradation_resources Sequence[str]
    Supported resources for SQL insights - performance degradation content type.
    sql_insights_plan_changes_resources Sequence[str]
    Supported resources for SQL insights - plan changes content type.
    sql_insights_top_databases_resources Sequence[str]
    Supported resources for SQL insights - top databases content type.
    sql_insights_top_sql_by_insights_resources Sequence[str]
    Supported resources for SQL insights - top SQL by insights content type.
    sql_insights_top_sql_resources Sequence[str]
    Supported resources for SQL insights - top SQL content type.
    capacityPlanningResources List<String>
    Supported resources for capacity planning content type.
    sqlInsightsFleetAnalysisResources List<String>
    Supported resources for SQL insights - fleet analysis content type.
    sqlInsightsPerformanceDegradationResources List<String>
    Supported resources for SQL insights - performance degradation content type.
    sqlInsightsPlanChangesResources List<String>
    Supported resources for SQL insights - plan changes content type.
    sqlInsightsTopDatabasesResources List<String>
    Supported resources for SQL insights - top databases content type.
    sqlInsightsTopSqlByInsightsResources List<String>
    Supported resources for SQL insights - top SQL by insights content type.
    sqlInsightsTopSqlResources List<String>
    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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi