oci logo
Oracle Cloud Infrastructure v0.19.0, May 26 23

oci.Ons.getNotificationTopics

Explore with Pulumi AI

This data source provides the list of Notification Topics in Oracle Cloud Infrastructure Notifications service.

Lists topics in the specified compartment.

Transactions Per Minute (TPM) per-tenancy limit for this operation: 120.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testNotificationTopics = Oci.Ons.GetNotificationTopics.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        Id = @var.Notification_topic_id,
        Name = @var.Notification_topic_name,
        State = @var.Notification_topic_state,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Ons.GetNotificationTopics(ctx, &ons.GetNotificationTopicsArgs{
			CompartmentId: _var.Compartment_id,
			Id:            pulumi.StringRef(_var.Notification_topic_id),
			Name:          pulumi.StringRef(_var.Notification_topic_name),
			State:         pulumi.StringRef(_var.Notification_topic_state),
		}, 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.Ons.OnsFunctions;
import com.pulumi.oci.Ons.inputs.GetNotificationTopicsArgs;
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 testNotificationTopics = OnsFunctions.getNotificationTopics(GetNotificationTopicsArgs.builder()
            .compartmentId(var_.compartment_id())
            .id(var_.notification_topic_id())
            .name(var_.notification_topic_name())
            .state(var_.notification_topic_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_notification_topics = oci.Ons.get_notification_topics(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testNotificationTopics = oci.Ons.getNotificationTopics({
    compartmentId: _var.compartment_id,
    id: _var.notification_topic_id,
    name: _var.notification_topic_name,
    state: _var.notification_topic_state,
});
variables:
  testNotificationTopics:
    fn::invoke:
      Function: oci:Ons:getNotificationTopics
      Arguments:
        compartmentId: ${var.compartment_id}
        id: ${var.notification_topic_id}
        name: ${var.notification_topic_name}
        state: ${var.notification_topic_state}

Using getNotificationTopics

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 getNotificationTopics(args: GetNotificationTopicsArgs, opts?: InvokeOptions): Promise<GetNotificationTopicsResult>
function getNotificationTopicsOutput(args: GetNotificationTopicsOutputArgs, opts?: InvokeOptions): Output<GetNotificationTopicsResult>
def get_notification_topics(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[_ons.GetNotificationTopicsFilter]] = None,
                            id: Optional[str] = None,
                            name: Optional[str] = None,
                            state: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetNotificationTopicsResult
def get_notification_topics_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[_ons.GetNotificationTopicsFilterArgs]]]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetNotificationTopicsResult]
func GetNotificationTopics(ctx *Context, args *GetNotificationTopicsArgs, opts ...InvokeOption) (*GetNotificationTopicsResult, error)
func GetNotificationTopicsOutput(ctx *Context, args *GetNotificationTopicsOutputArgs, opts ...InvokeOption) GetNotificationTopicsResultOutput

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

public static class GetNotificationTopics 
{
    public static Task<GetNotificationTopicsResult> InvokeAsync(GetNotificationTopicsArgs args, InvokeOptions? opts = null)
    public static Output<GetNotificationTopicsResult> Invoke(GetNotificationTopicsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNotificationTopicsResult> getNotificationTopics(GetNotificationTopicsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:Ons/getNotificationTopics:getNotificationTopics
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

Filters List<GetNotificationTopicsFilter>
Id string

A filter to only return resources that match the given id exactly.

Name string

A filter to only return resources that match the given name exactly.

State string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

CompartmentId string

The OCID of the compartment.

Filters []GetNotificationTopicsFilter
Id string

A filter to only return resources that match the given id exactly.

Name string

A filter to only return resources that match the given name exactly.

State string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

compartmentId String

The OCID of the compartment.

filters List<GetNotificationTopicsFilter>
id String

A filter to only return resources that match the given id exactly.

name String

A filter to only return resources that match the given name exactly.

state String

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

compartmentId string

The OCID of the compartment.

filters GetNotificationTopicsFilter[]
id string

A filter to only return resources that match the given id exactly.

name string

A filter to only return resources that match the given name exactly.

state string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

compartment_id str

The OCID of the compartment.

filters GetNotificationTopicsFilter]
id str

A filter to only return resources that match the given id exactly.

name str

A filter to only return resources that match the given name exactly.

state str

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

compartmentId String

The OCID of the compartment.

filters List<Property Map>
id String

A filter to only return resources that match the given id exactly.

name String

A filter to only return resources that match the given name exactly.

state String

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

getNotificationTopics Result

The following output properties are available:

CompartmentId string

The OCID of the compartment for the topic.

NotificationTopics List<GetNotificationTopicsNotificationTopic>

The list of notification_topics.

Filters List<GetNotificationTopicsFilter>
Id string
Name string

The name of the topic.

State string

The lifecycle state of the topic.

CompartmentId string

The OCID of the compartment for the topic.

NotificationTopics []GetNotificationTopicsNotificationTopic

The list of notification_topics.

Filters []GetNotificationTopicsFilter
Id string
Name string

The name of the topic.

State string

The lifecycle state of the topic.

compartmentId String

The OCID of the compartment for the topic.

notificationTopics List<GetNotificationTopicsNotificationTopic>

The list of notification_topics.

filters List<GetNotificationTopicsFilter>
id String
name String

The name of the topic.

state String

The lifecycle state of the topic.

compartmentId string

The OCID of the compartment for the topic.

notificationTopics GetNotificationTopicsNotificationTopic[]

The list of notification_topics.

filters GetNotificationTopicsFilter[]
id string
name string

The name of the topic.

state string

The lifecycle state of the topic.

compartment_id str

The OCID of the compartment for the topic.

notification_topics GetNotificationTopicsNotificationTopic]

The list of notification_topics.

filters GetNotificationTopicsFilter]
id str
name str

The name of the topic.

state str

The lifecycle state of the topic.

compartmentId String

The OCID of the compartment for the topic.

notificationTopics List<Property Map>

The list of notification_topics.

filters List<Property Map>
id String
name String

The name of the topic.

state String

The lifecycle state of the topic.

Supporting Types

GetNotificationTopicsFilter

Name string

A filter to only return resources that match the given name exactly.

Values List<string>
Regex bool
Name string

A filter to only return resources that match the given name exactly.

Values []string
Regex bool
name String

A filter to only return resources that match the given name exactly.

values List<String>
regex Boolean
name string

A filter to only return resources that match the given name exactly.

values string[]
regex boolean
name str

A filter to only return resources that match the given name exactly.

values Sequence[str]
regex bool
name String

A filter to only return resources that match the given name exactly.

values List<String>
regex Boolean

GetNotificationTopicsNotificationTopic

ApiEndpoint string

The endpoint for managing subscriptions or publishing messages to the topic.

CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

Description string

The description of the topic.

Etag string

For optimistic concurrency control. See if-match.

FreeformTags Dictionary<string, object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

A filter to only return resources that match the given id exactly.

Name string

A filter to only return resources that match the given name exactly.

ShortTopicId string

A unique short topic Id. This is used only for SMS subscriptions.

State string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

TimeCreated string

The time the topic was created.

TopicId string

The OCID of the topic.

ApiEndpoint string

The endpoint for managing subscriptions or publishing messages to the topic.

CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

Description string

The description of the topic.

Etag string

For optimistic concurrency control. See if-match.

FreeformTags map[string]interface{}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

A filter to only return resources that match the given id exactly.

Name string

A filter to only return resources that match the given name exactly.

ShortTopicId string

A unique short topic Id. This is used only for SMS subscriptions.

State string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

TimeCreated string

The time the topic was created.

TopicId string

The OCID of the topic.

apiEndpoint String

The endpoint for managing subscriptions or publishing messages to the topic.

compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description String

The description of the topic.

etag String

For optimistic concurrency control. See if-match.

freeformTags Map<String,Object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

A filter to only return resources that match the given id exactly.

name String

A filter to only return resources that match the given name exactly.

shortTopicId String

A unique short topic Id. This is used only for SMS subscriptions.

state String

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

timeCreated String

The time the topic was created.

topicId String

The OCID of the topic.

apiEndpoint string

The endpoint for managing subscriptions or publishing messages to the topic.

compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description string

The description of the topic.

etag string

For optimistic concurrency control. See if-match.

freeformTags {[key: string]: any}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id string

A filter to only return resources that match the given id exactly.

name string

A filter to only return resources that match the given name exactly.

shortTopicId string

A unique short topic Id. This is used only for SMS subscriptions.

state string

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

timeCreated string

The time the topic was created.

topicId string

The OCID of the topic.

api_endpoint str

The endpoint for managing subscriptions or publishing messages to the topic.

compartment_id str

The OCID of the compartment.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description str

The description of the topic.

etag str

For optimistic concurrency control. See if-match.

freeform_tags Mapping[str, Any]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id str

A filter to only return resources that match the given id exactly.

name str

A filter to only return resources that match the given name exactly.

short_topic_id str

A unique short topic Id. This is used only for SMS subscriptions.

state str

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

time_created str

The time the topic was created.

topic_id str

The OCID of the topic.

apiEndpoint String

The endpoint for managing subscriptions or publishing messages to the topic.

compartmentId String

The OCID of the compartment.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description String

The description of the topic.

etag String

For optimistic concurrency control. See if-match.

freeformTags Map<Any>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

A filter to only return resources that match the given id exactly.

name String

A filter to only return resources that match the given name exactly.

shortTopicId String

A unique short topic Id. This is used only for SMS subscriptions.

state String

Filter returned list by specified lifecycle state. This parameter is case-insensitive.

timeCreated String

The time the topic was created.

topicId String

The OCID of the topic.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.