We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.servicebus.getSubscription
Explore with Pulumi AI
Use this data source to access information about an existing ServiceBus Subscription.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getSubscription({
name: "examplesubscription",
topicId: "exampletopic",
});
export const servicebusSubscription = exampleAzurermServicebusNamespace;
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_subscription(name="examplesubscription",
topic_id="exampletopic")
pulumi.export("servicebusSubscription", example_azurerm_servicebus_namespace)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicebus.LookupSubscription(ctx, &servicebus.LookupSubscriptionArgs{
Name: "examplesubscription",
TopicId: pulumi.StringRef("exampletopic"),
}, nil)
if err != nil {
return err
}
ctx.Export("servicebusSubscription", exampleAzurermServicebusNamespace)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ServiceBus.GetSubscription.Invoke(new()
{
Name = "examplesubscription",
TopicId = "exampletopic",
});
return new Dictionary<string, object?>
{
["servicebusSubscription"] = exampleAzurermServicebusNamespace,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.servicebus.ServicebusFunctions;
import com.pulumi.azure.servicebus.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 example = ServicebusFunctions.getSubscription(GetSubscriptionArgs.builder()
.name("examplesubscription")
.topicId("exampletopic")
.build());
ctx.export("servicebusSubscription", exampleAzurermServicebusNamespace);
}
}
variables:
example:
fn::invoke:
Function: azure:servicebus:getSubscription
Arguments:
name: examplesubscription
topicId: exampletopic
outputs:
servicebusSubscription: ${exampleAzurermServicebusNamespace}
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(name: Optional[str] = None,
namespace_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionResult
def get_subscription_output(name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
topic_id: Optional[pulumi.Input[str]] = None,
topic_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionResult]
func LookupSubscription(ctx *Context, args *LookupSubscriptionArgs, opts ...InvokeOption) (*LookupSubscriptionResult, error)
func LookupSubscriptionOutput(ctx *Context, args *LookupSubscriptionOutputArgs, opts ...InvokeOption) LookupSubscriptionResultOutput
> Note: This function is named LookupSubscription
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: azure:servicebus/getSubscription:getSubscription
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Specifies the name of the ServiceBus Subscription.
- Namespace
Name string - Resource
Group stringName - Topic
Id string - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- Topic
Name string
- Name string
- Specifies the name of the ServiceBus Subscription.
- Namespace
Name string - Resource
Group stringName - Topic
Id string - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- Topic
Name string
- name String
- Specifies the name of the ServiceBus Subscription.
- namespace
Name String - resource
Group StringName - topic
Id String - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- topic
Name String
- name string
- Specifies the name of the ServiceBus Subscription.
- namespace
Name string - resource
Group stringName - topic
Id string - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- topic
Name string
- name str
- Specifies the name of the ServiceBus Subscription.
- namespace_
name str - resource_
group_ strname - topic_
id str - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- topic_
name str
- name String
- Specifies the name of the ServiceBus Subscription.
- namespace
Name String - resource
Group StringName - topic
Id String - The ID of the ServiceBus Topic where the Service Bus Subscription exists.
- topic
Name String
getSubscription Result
The following output properties are available:
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted.
- Dead
Lettering boolOn Filter Evaluation Error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- Dead
Lettering boolOn Message Expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- Default
Message stringTtl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- Enable
Batched boolOperations - Are batched operations enabled on this ServiceBus Subscription?
- Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lock
Duration string - The lock duration for the subscription.
- Max
Delivery intCount - The maximum number of deliveries.
- Name string
- Requires
Session bool - Whether or not this ServiceBus Subscription supports session.
- Namespace
Name string - Resource
Group stringName - Topic
Id string - Topic
Name string
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted.
- Dead
Lettering boolOn Filter Evaluation Error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- Dead
Lettering boolOn Message Expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- Default
Message stringTtl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- Enable
Batched boolOperations - Are batched operations enabled on this ServiceBus Subscription?
- Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lock
Duration string - The lock duration for the subscription.
- Max
Delivery intCount - The maximum number of deliveries.
- Name string
- Requires
Session bool - Whether or not this ServiceBus Subscription supports session.
- Namespace
Name string - Resource
Group stringName - Topic
Id string - Topic
Name string
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted.
- dead
Lettering BooleanOn Filter Evaluation Error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- dead
Lettering BooleanOn Message Expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- default
Message StringTtl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- enable
Batched BooleanOperations - Are batched operations enabled on this ServiceBus Subscription?
- forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- id String
- The provider-assigned unique ID for this managed resource.
- lock
Duration String - The lock duration for the subscription.
- max
Delivery IntegerCount - The maximum number of deliveries.
- name String
- requires
Session Boolean - Whether or not this ServiceBus Subscription supports session.
- namespace
Name String - resource
Group StringName - topic
Id String - topic
Name String
- auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted.
- dead
Lettering booleanOn Filter Evaluation Error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- dead
Lettering booleanOn Message Expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- default
Message stringTtl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- enable
Batched booleanOperations - Are batched operations enabled on this ServiceBus Subscription?
- forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To string - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- id string
- The provider-assigned unique ID for this managed resource.
- lock
Duration string - The lock duration for the subscription.
- max
Delivery numberCount - The maximum number of deliveries.
- name string
- requires
Session boolean - Whether or not this ServiceBus Subscription supports session.
- namespace
Name string - resource
Group stringName - topic
Id string - topic
Name string
- auto_
delete_ stron_ idle - The idle interval after which the topic is automatically deleted.
- dead_
lettering_ boolon_ filter_ evaluation_ error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- dead_
lettering_ boolon_ message_ expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- default_
message_ strttl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- enable_
batched_ booloperations - Are batched operations enabled on this ServiceBus Subscription?
- forward_
dead_ strlettered_ messages_ to - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward_
to str - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- id str
- The provider-assigned unique ID for this managed resource.
- lock_
duration str - The lock duration for the subscription.
- max_
delivery_ intcount - The maximum number of deliveries.
- name str
- requires_
session bool - Whether or not this ServiceBus Subscription supports session.
- namespace_
name str - resource_
group_ strname - topic_
id str - topic_
name str
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted.
- dead
Lettering BooleanOn Filter Evaluation Error - Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
- dead
Lettering BooleanOn Message Expiration - Does the Service Bus Subscription have dead letter support when a message expires?
- default
Message StringTtl - The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
- enable
Batched BooleanOperations - Are batched operations enabled on this ServiceBus Subscription?
- forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
- id String
- The provider-assigned unique ID for this managed resource.
- lock
Duration String - The lock duration for the subscription.
- max
Delivery NumberCount - The maximum number of deliveries.
- name String
- requires
Session Boolean - Whether or not this ServiceBus Subscription supports session.
- namespace
Name String - resource
Group StringName - topic
Id String - topic
Name String
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.