Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Ons.getSubscriptions
Explore with Pulumi AI
This data source provides the list of Subscriptions in Oracle Cloud Infrastructure Notifications service.
Lists the subscriptions in the specified compartment or topic.
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 testSubscriptions = oci.Ons.getSubscriptions({
compartmentId: compartmentId,
topicId: testNotificationTopic.id,
});
import pulumi
import pulumi_oci as oci
test_subscriptions = oci.Ons.get_subscriptions(compartment_id=compartment_id,
topic_id=test_notification_topic["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Ons"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Ons.GetSubscriptions(ctx, &ons.GetSubscriptionsArgs{
CompartmentId: compartmentId,
TopicId: pulumi.StringRef(testNotificationTopic.Id),
}, 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 testSubscriptions = Oci.Ons.GetSubscriptions.Invoke(new()
{
CompartmentId = compartmentId,
TopicId = testNotificationTopic.Id,
});
});
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.GetSubscriptionsArgs;
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 testSubscriptions = OnsFunctions.getSubscriptions(GetSubscriptionsArgs.builder()
.compartmentId(compartmentId)
.topicId(testNotificationTopic.id())
.build());
}
}
variables:
testSubscriptions:
fn::invoke:
Function: oci:Ons:getSubscriptions
Arguments:
compartmentId: ${compartmentId}
topicId: ${testNotificationTopic.id}
Using getSubscriptions
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 getSubscriptions(args: GetSubscriptionsArgs, opts?: InvokeOptions): Promise<GetSubscriptionsResult>
function getSubscriptionsOutput(args: GetSubscriptionsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionsResult>
def get_subscriptions(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_ons.GetSubscriptionsFilter]] = None,
topic_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionsResult
def get_subscriptions_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_ons.GetSubscriptionsFilterArgs]]]] = None,
topic_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionsResult]
func GetSubscriptions(ctx *Context, args *GetSubscriptionsArgs, opts ...InvokeOption) (*GetSubscriptionsResult, error)
func GetSubscriptionsOutput(ctx *Context, args *GetSubscriptionsOutputArgs, opts ...InvokeOption) GetSubscriptionsResultOutput
> Note: This function is named GetSubscriptions
in the Go SDK.
public static class GetSubscriptions
{
public static Task<GetSubscriptionsResult> InvokeAsync(GetSubscriptionsArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionsResult> Invoke(GetSubscriptionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubscriptionsResult> getSubscriptions(GetSubscriptionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Ons/getSubscriptions:getSubscriptions
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
Subscriptions Filter> - Topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
Subscriptions Filter - Topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
Subscriptions Filter> - topic
Id String - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id string - The OCID of the compartment.
- filters
Get
Subscriptions Filter[] - topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment_
id str - The OCID of the compartment.
- filters
Sequence[ons.
Get Subscriptions Filter] - topic_
id str - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
- topic
Id String - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
getSubscriptions Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment for the subscription.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscriptions
List<Get
Subscriptions Subscription> - The list of subscriptions.
- Filters
List<Get
Subscriptions Filter> - Topic
Id string - The OCID of the associated topic.
- Compartment
Id string - The OCID of the compartment for the subscription.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscriptions
[]Get
Subscriptions Subscription - The list of subscriptions.
- Filters
[]Get
Subscriptions Filter - Topic
Id string - The OCID of the associated topic.
- compartment
Id String - The OCID of the compartment for the subscription.
- id String
- The provider-assigned unique ID for this managed resource.
- subscriptions
List<Get
Subscriptions Subscription> - The list of subscriptions.
- filters
List<Get
Subscriptions Filter> - topic
Id String - The OCID of the associated topic.
- compartment
Id string - The OCID of the compartment for the subscription.
- id string
- The provider-assigned unique ID for this managed resource.
- subscriptions
Get
Subscriptions Subscription[] - The list of subscriptions.
- filters
Get
Subscriptions Filter[] - topic
Id string - The OCID of the associated topic.
- compartment_
id str - The OCID of the compartment for the subscription.
- id str
- The provider-assigned unique ID for this managed resource.
- subscriptions
Sequence[ons.
Get Subscriptions Subscription] - The list of subscriptions.
- filters
Sequence[ons.
Get Subscriptions Filter] - topic_
id str - The OCID of the associated topic.
- compartment
Id String - The OCID of the compartment for the subscription.
- id String
- The provider-assigned unique ID for this managed resource.
- subscriptions List<Property Map>
- The list of subscriptions.
- filters List<Property Map>
- topic
Id String - The OCID of the associated topic.
Supporting Types
GetSubscriptionsFilter
GetSubscriptionsSubscription
- Compartment
Id string - The OCID of the compartment.
- Created
Time string - The time when this suscription was created.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Delivery
Policies List<GetSubscriptions Subscription Delivery Policy> - Endpoint string
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - Etag string
- For optimistic concurrency control. See
if-match
. - Dictionary<string, string>
- 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
- The OCID of the subscription.
- Protocol string
- The protocol used for the subscription.
- State string
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- Topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- Compartment
Id string - The OCID of the compartment.
- Created
Time string - The time when this suscription was created.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Delivery
Policies []GetSubscriptions Subscription Delivery Policy - Endpoint string
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - Etag string
- For optimistic concurrency control. See
if-match
. - map[string]string
- 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
- The OCID of the subscription.
- Protocol string
- The protocol used for the subscription.
- State string
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- Topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id String - The OCID of the compartment.
- created
Time String - The time when this suscription was created.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- delivery
Policies List<GetSubscriptions Subscription Delivery Policy> - endpoint String
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - etag String
- For optimistic concurrency control. See
if-match
. - Map<String,String>
- 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
- The OCID of the subscription.
- protocol String
- The protocol used for the subscription.
- state String
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- topic
Id String - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id string - The OCID of the compartment.
- created
Time string - The time when this suscription was created.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- delivery
Policies GetSubscriptions Subscription Delivery Policy[] - endpoint string
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - etag string
- For optimistic concurrency control. See
if-match
. - {[key: string]: string}
- 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
- The OCID of the subscription.
- protocol string
- The protocol used for the subscription.
- state string
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- topic
Id string - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment_
id str - The OCID of the compartment.
- created_
time str - The time when this suscription was created.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- delivery_
policies Sequence[ons.Get Subscriptions Subscription Delivery Policy] - endpoint str
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - etag str
- For optimistic concurrency control. See
if-match
. - Mapping[str, str]
- 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
- The OCID of the subscription.
- protocol str
- The protocol used for the subscription.
- state str
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- topic_
id str - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
- compartment
Id String - The OCID of the compartment.
- created
Time String - The time when this suscription was created.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- delivery
Policies List<Property Map> - endpoint String
- A locator that corresponds to the subscription protocol. For example, an email address for a subscription that uses the
EMAIL
protocol, or a URL for a subscription that uses an HTTP-based protocol. Avoid entering confidential information. - etag String
- For optimistic concurrency control. See
if-match
. - Map<String>
- 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
- The OCID of the subscription.
- protocol String
- The protocol used for the subscription.
- state String
- The lifecycle state of the subscription. The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- topic
Id String - Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
GetSubscriptionsSubscriptionDeliveryPolicy
GetSubscriptionsSubscriptionDeliveryPolicyBackoffRetryPolicy
- Max
Retry intDuration - The maximum retry duration in milliseconds.
- Policy
Type string - The type of delivery policy. Default value: EXPONENTIAL.
- Max
Retry intDuration - The maximum retry duration in milliseconds.
- Policy
Type string - The type of delivery policy. Default value: EXPONENTIAL.
- max
Retry IntegerDuration - The maximum retry duration in milliseconds.
- policy
Type String - The type of delivery policy. Default value: EXPONENTIAL.
- max
Retry numberDuration - The maximum retry duration in milliseconds.
- policy
Type string - The type of delivery policy. Default value: EXPONENTIAL.
- max_
retry_ intduration - The maximum retry duration in milliseconds.
- policy_
type str - The type of delivery policy. Default value: EXPONENTIAL.
- max
Retry NumberDuration - The maximum retry duration in milliseconds.
- policy
Type String - The type of delivery policy. Default value: EXPONENTIAL.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.