oci.Ons.NotificationTopic
Explore with Pulumi AI
This resource provides the Notification Topic resource in Oracle Cloud Infrastructure Notifications service.
Creates a topic in the specified compartment. For general information about topics, see Managing Topics and Subscriptions.
For the purposes of access control, you must provide the OCID of the compartment where you want the topic to reside. For information about access control and compartments, see Overview of the IAM Service.
You must specify a display name for the topic.
All Oracle Cloud Infrastructure resources, including topics, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type, or by viewing the resource in the Console. For more information, see Resource Identifiers.
Transactions Per Minute (TPM) per-tenancy limit for this operation: 60.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNotificationTopic = new oci.ons.NotificationTopic("test_notification_topic", {
compartmentId: compartmentId,
name: notificationTopicName,
definedTags: {
"Operations.CostCenter": "42",
},
description: notificationTopicDescription,
freeformTags: {
Department: "Finance",
},
});
import pulumi
import pulumi_oci as oci
test_notification_topic = oci.ons.NotificationTopic("test_notification_topic",
compartment_id=compartment_id,
name=notification_topic_name,
defined_tags={
"Operations.CostCenter": "42",
},
description=notification_topic_description,
freeform_tags={
"Department": "Finance",
})
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.NewNotificationTopic(ctx, "test_notification_topic", &Ons.NotificationTopicArgs{
CompartmentId: pulumi.Any(compartmentId),
Name: pulumi.Any(notificationTopicName),
DefinedTags: pulumi.Map{
"Operations.CostCenter": pulumi.Any("42"),
},
Description: pulumi.Any(notificationTopicDescription),
FreeformTags: pulumi.Map{
"Department": pulumi.Any("Finance"),
},
})
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 testNotificationTopic = new Oci.Ons.NotificationTopic("test_notification_topic", new()
{
CompartmentId = compartmentId,
Name = notificationTopicName,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
Description = notificationTopicDescription,
FreeformTags =
{
{ "Department", "Finance" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Ons.NotificationTopic;
import com.pulumi.oci.Ons.NotificationTopicArgs;
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) {
var testNotificationTopic = new NotificationTopic("testNotificationTopic", NotificationTopicArgs.builder()
.compartmentId(compartmentId)
.name(notificationTopicName)
.definedTags(Map.of("Operations.CostCenter", "42"))
.description(notificationTopicDescription)
.freeformTags(Map.of("Department", "Finance"))
.build());
}
}
resources:
testNotificationTopic:
type: oci:Ons:NotificationTopic
name: test_notification_topic
properties:
compartmentId: ${compartmentId}
name: ${notificationTopicName}
definedTags:
Operations.CostCenter: '42'
description: ${notificationTopicDescription}
freeformTags:
Department: Finance
Create NotificationTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationTopic(name: string, args: NotificationTopicArgs, opts?: CustomResourceOptions);
@overload
def NotificationTopic(resource_name: str,
args: NotificationTopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationTopic(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None)
func NewNotificationTopic(ctx *Context, name string, args NotificationTopicArgs, opts ...ResourceOption) (*NotificationTopic, error)
public NotificationTopic(string name, NotificationTopicArgs args, CustomResourceOptions? opts = null)
public NotificationTopic(String name, NotificationTopicArgs args)
public NotificationTopic(String name, NotificationTopicArgs args, CustomResourceOptions options)
type: oci:Ons:NotificationTopic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotificationTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotificationTopicArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotificationTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationTopicArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notificationTopicResource = new Oci.Ons.NotificationTopic("notificationTopicResource", new()
{
CompartmentId = "string",
DefinedTags =
{
{ "string", "any" },
},
Description = "string",
FreeformTags =
{
{ "string", "any" },
},
Name = "string",
});
example, err := Ons.NewNotificationTopic(ctx, "notificationTopicResource", &Ons.NotificationTopicArgs{
CompartmentId: pulumi.String("string"),
DefinedTags: pulumi.Map{
"string": pulumi.Any("any"),
},
Description: pulumi.String("string"),
FreeformTags: pulumi.Map{
"string": pulumi.Any("any"),
},
Name: pulumi.String("string"),
})
var notificationTopicResource = new NotificationTopic("notificationTopicResource", NotificationTopicArgs.builder()
.compartmentId("string")
.definedTags(Map.of("string", "any"))
.description("string")
.freeformTags(Map.of("string", "any"))
.name("string")
.build());
notification_topic_resource = oci.ons.NotificationTopic("notificationTopicResource",
compartment_id="string",
defined_tags={
"string": "any",
},
description="string",
freeform_tags={
"string": "any",
},
name="string")
const notificationTopicResource = new oci.ons.NotificationTopic("notificationTopicResource", {
compartmentId: "string",
definedTags: {
string: "any",
},
description: "string",
freeformTags: {
string: "any",
},
name: "string",
});
type: oci:Ons:NotificationTopic
properties:
compartmentId: string
definedTags:
string: any
description: string
freeformTags:
string: any
name: string
NotificationTopic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NotificationTopic resource accepts the following input properties:
- Compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- Dictionary<string, object>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Dictionary<string, object>
- (Updatable) 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"}
- Name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- map[string]interface{}
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- map[string]interface{}
- (Updatable) 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"}
- Name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment to create the topic in.
- Map<String,Object>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Map<String,Object>
- (Updatable) 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"}
- name String
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- {[key: string]: any}
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- {[key: string]: any}
- (Updatable) 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"}
- name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
id str - (Updatable) The OCID of the compartment to create the topic in.
- Mapping[str, Any]
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Mapping[str, Any]
- (Updatable) 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"}
- name str
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment to create the topic in.
- Map<Any>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Map<Any>
- (Updatable) 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"}
- name String
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationTopic resource produces the following output properties:
- Api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- Etag string
- For optimistic concurrency control. See
if-match
. - Id string
- The provider-assigned unique ID for this managed resource.
- Short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- State string
- The lifecycle state of the topic.
- Time
Created string - The time the topic was created.
- Topic
Id string - The OCID of the topic.
- Api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- Etag string
- For optimistic concurrency control. See
if-match
. - Id string
- The provider-assigned unique ID for this managed resource.
- Short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- State string
- The lifecycle state of the topic.
- Time
Created string - The time the topic was created.
- Topic
Id string - The OCID of the topic.
- api
Endpoint String - The endpoint for managing subscriptions or publishing messages to the topic.
- etag String
- For optimistic concurrency control. See
if-match
. - id String
- The provider-assigned unique ID for this managed resource.
- short
Topic StringId - A unique short topic Id. This is used only for SMS subscriptions.
- state String
- The lifecycle state of the topic.
- time
Created String - The time the topic was created.
- topic
Id String - The OCID of the topic.
- api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- etag string
- For optimistic concurrency control. See
if-match
. - id string
- The provider-assigned unique ID for this managed resource.
- short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- state string
- The lifecycle state of the topic.
- time
Created string - The time the topic was created.
- topic
Id string - The OCID of the topic.
- api_
endpoint str - The endpoint for managing subscriptions or publishing messages to the topic.
- etag str
- For optimistic concurrency control. See
if-match
. - id str
- The provider-assigned unique ID for this managed resource.
- short_
topic_ strid - A unique short topic Id. This is used only for SMS subscriptions.
- state str
- The lifecycle state of the topic.
- time_
created str - The time the topic was created.
- topic_
id str - The OCID of the topic.
- api
Endpoint String - The endpoint for managing subscriptions or publishing messages to the topic.
- etag String
- For optimistic concurrency control. See
if-match
. - id String
- The provider-assigned unique ID for this managed resource.
- short
Topic StringId - A unique short topic Id. This is used only for SMS subscriptions.
- state String
- The lifecycle state of the topic.
- time
Created String - The time the topic was created.
- topic
Id String - The OCID of the topic.
Look up Existing NotificationTopic Resource
Get an existing NotificationTopic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotificationTopicState, opts?: CustomResourceOptions): NotificationTopic
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_endpoint: Optional[str] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
description: Optional[str] = None,
etag: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None,
short_topic_id: Optional[str] = None,
state: Optional[str] = None,
time_created: Optional[str] = None,
topic_id: Optional[str] = None) -> NotificationTopic
func GetNotificationTopic(ctx *Context, name string, id IDInput, state *NotificationTopicState, opts ...ResourceOption) (*NotificationTopic, error)
public static NotificationTopic Get(string name, Input<string> id, NotificationTopicState? state, CustomResourceOptions? opts = null)
public static NotificationTopic get(String name, Output<String> id, NotificationTopicState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- Compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- Dictionary<string, object>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Etag string
- For optimistic concurrency control. See
if-match
. - Dictionary<string, object>
- (Updatable) 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"}
- Name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- State string
- The lifecycle state of the topic.
- Time
Created string - The time the topic was created.
- Topic
Id string - The OCID of the topic.
- Api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- Compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- map[string]interface{}
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- Etag string
- For optimistic concurrency control. See
if-match
. - map[string]interface{}
- (Updatable) 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"}
- Name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- State string
- The lifecycle state of the topic.
- Time
Created string - The time the topic was created.
- Topic
Id string - The OCID of the topic.
- api
Endpoint String - The endpoint for managing subscriptions or publishing messages to the topic.
- compartment
Id String - (Updatable) The OCID of the compartment to create the topic in.
- Map<String,Object>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- etag String
- For optimistic concurrency control. See
if-match
. - Map<String,Object>
- (Updatable) 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"}
- name String
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- short
Topic StringId - A unique short topic Id. This is used only for SMS subscriptions.
- state String
- The lifecycle state of the topic.
- time
Created String - The time the topic was created.
- topic
Id String - The OCID of the topic.
- api
Endpoint string - The endpoint for managing subscriptions or publishing messages to the topic.
- compartment
Id string - (Updatable) The OCID of the compartment to create the topic in.
- {[key: string]: any}
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- etag string
- For optimistic concurrency control. See
if-match
. - {[key: string]: any}
- (Updatable) 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"}
- name string
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- short
Topic stringId - A unique short topic Id. This is used only for SMS subscriptions.
- state string
- The lifecycle state of the topic.
- time
Created string - The time the topic was created.
- topic
Id string - The OCID of the topic.
- api_
endpoint str - The endpoint for managing subscriptions or publishing messages to the topic.
- compartment_
id str - (Updatable) The OCID of the compartment to create the topic in.
- Mapping[str, Any]
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- etag str
- For optimistic concurrency control. See
if-match
. - Mapping[str, Any]
- (Updatable) 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"}
- name str
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- short_
topic_ strid - A unique short topic Id. This is used only for SMS subscriptions.
- state str
- The lifecycle state of the topic.
- time_
created str - The time the topic was created.
- topic_
id str - The OCID of the topic.
- api
Endpoint String - The endpoint for managing subscriptions or publishing messages to the topic.
- compartment
Id String - (Updatable) The OCID of the compartment to create the topic in.
- Map<Any>
- (Updatable) 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
- (Updatable) The description of the topic being created. Avoid entering confidential information.
- etag String
- For optimistic concurrency control. See
if-match
. - Map<Any>
- (Updatable) 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"}
- name String
The name of the topic being created. The topic name must be unique across the tenancy. Avoid entering confidential information.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- short
Topic StringId - A unique short topic Id. This is used only for SMS subscriptions.
- state String
- The lifecycle state of the topic.
- time
Created String - The time the topic was created.
- topic
Id String - The OCID of the topic.
Import
NotificationTopics can be imported using the id
, e.g.
$ pulumi import oci:Ons/notificationTopic:NotificationTopic test_notification_topic "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.