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

oci.Ons.getSubscription

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

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

    SubscriptionId string
    The OCID of the subscription to retrieve.
    SubscriptionId string
    The OCID of the subscription to retrieve.
    subscriptionId String
    The OCID of the subscription to retrieve.
    subscriptionId string
    The OCID of the subscription to retrieve.
    subscription_id str
    The OCID of the subscription to retrieve.
    subscriptionId String
    The OCID of the subscription to retrieve.

    getSubscription Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment for the subscription.
    CreatedTime string
    The time when this suscription was created.
    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"}
    DeliveryPolicy 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.
    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
    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.
    SubscriptionId string
    TopicId string
    The OCID of the associated topic.
    CompartmentId string
    The OCID of the compartment for the subscription.
    CreatedTime string
    The time when this suscription was created.
    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"}
    DeliveryPolicy 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.
    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
    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.
    SubscriptionId string
    TopicId string
    The OCID of the associated topic.
    compartmentId String
    The OCID of the compartment for the subscription.
    createdTime String
    The time when this suscription was created.
    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"}
    deliveryPolicy 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.
    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
    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.
    subscriptionId String
    topicId String
    The OCID of the associated topic.
    compartmentId string
    The OCID of the compartment for the subscription.
    createdTime string
    The time when this suscription was created.
    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"}
    deliveryPolicy 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.
    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
    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.
    subscriptionId string
    topicId 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.
    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"}
    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.
    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
    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.
    compartmentId String
    The OCID of the compartment for the subscription.
    createdTime String
    The time when this suscription was created.
    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"}
    deliveryPolicy 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.
    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
    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.
    subscriptionId String
    topicId 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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi