Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Ons.getSubscription
Explore with Pulumi AI
This data source provides details about a specific Subscription resource in Oracle Cloud Infrastructure Notifications service.
Gets the specified subscription’s configuration information.
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 testSubscription = oci.Ons.getSubscription({
subscriptionId: testSubscriptionOciOnsSubscription.id,
});
import pulumi
import pulumi_oci as oci
test_subscription = oci.Ons.get_subscription(subscription_id=test_subscription_oci_ons_subscription["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.GetSubscription(ctx, &ons.GetSubscriptionArgs{
SubscriptionId: testSubscriptionOciOnsSubscription.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 testSubscription = Oci.Ons.GetSubscription.Invoke(new()
{
SubscriptionId = testSubscriptionOciOnsSubscription.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.GetSubscriptionArgs;
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 testSubscription = OnsFunctions.getSubscription(GetSubscriptionArgs.builder()
.subscriptionId(testSubscriptionOciOnsSubscription.id())
.build());
}
}
variables:
testSubscription:
fn::invoke:
Function: oci:Ons:getSubscription
Arguments:
subscriptionId: ${testSubscriptionOciOnsSubscription.id}
Using getSubscription
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 getSubscription(args: GetSubscriptionArgs, opts?: InvokeOptions): Promise<GetSubscriptionResult>
function getSubscriptionOutput(args: GetSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionResult>
def get_subscription(subscription_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionResult
def get_subscription_output(subscription_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionResult]
func GetSubscription(ctx *Context, args *GetSubscriptionArgs, opts ...InvokeOption) (*GetSubscriptionResult, error)
func GetSubscriptionOutput(ctx *Context, args *GetSubscriptionOutputArgs, opts ...InvokeOption) GetSubscriptionResultOutput
> Note: This function is named GetSubscription
in the Go SDK.
public static class GetSubscription
{
public static Task<GetSubscriptionResult> InvokeAsync(GetSubscriptionArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionResult> Invoke(GetSubscriptionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Ons/getSubscription:getSubscription
arguments:
# arguments dictionary
The following arguments are supported:
- Subscription
Id string - The OCID of the subscription to retrieve.
- Subscription
Id string - The OCID of the subscription to retrieve.
- subscription
Id String - The OCID of the subscription to retrieve.
- subscription
Id string - The OCID of the subscription to retrieve.
- subscription_
id str - The OCID of the subscription to retrieve.
- subscription
Id String - The OCID of the subscription to retrieve.
getSubscription Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment for the subscription.
- 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
Policy string - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- Subscription
Id string - Topic
Id string - The OCID of the associated topic.
- Compartment
Id string - The OCID of the compartment for the subscription.
- 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
Policy string - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- Subscription
Id string - Topic
Id string - The OCID of the associated topic.
- compartment
Id String - The OCID of the compartment for the subscription.
- 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
Policy String - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- subscription
Id String - topic
Id String - The OCID of the associated topic.
- compartment
Id string - The OCID of the compartment for the subscription.
- 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
Policy string - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- subscription
Id string - topic
Id string - The OCID of the associated topic.
- compartment_
id str - The OCID of the compartment for the subscription.
- 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_
policy str - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- subscription_
id str - topic_
id str - The OCID of the associated topic.
- compartment
Id String - The OCID of the compartment for the subscription.
- 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
Policy String - The delivery policy of the subscription. Stored as a JSON string.
- 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. - 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.
- subscription
Id String - topic
Id String - The OCID of the associated topic.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.