/
getSubscription.go
87 lines (82 loc) · 3.63 KB
/
getSubscription.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an existing ServiceBus Subscription.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/servicebus"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := servicebus.LookupSubscription(ctx, &servicebus.LookupSubscriptionArgs{
// Name: "examplesubscription",
// ResourceGroupName: "exampleresources",
// NamespaceName: "examplenamespace",
// TopicName: "exampletopic",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("servicebusSubscription", data.Azurerm_servicebus_namespace.Example)
// return nil
// })
// }
// ```
func LookupSubscription(ctx *pulumi.Context, args *LookupSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionResult, error) {
var rv LookupSubscriptionResult
err := ctx.Invoke("azure:servicebus/getSubscription:getSubscription", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSubscription.
type LookupSubscriptionArgs struct {
// Specifies the name of the ServiceBus Subscription.
Name string `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName string `pulumi:"namespaceName"`
// Specifies the name of the Resource Group where the ServiceBus Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the ServiceBus Topic.
TopicName string `pulumi:"topicName"`
}
// A collection of values returned by getSubscription.
type LookupSubscriptionResult struct {
// The idle interval after which the topic is automatically deleted.
AutoDeleteOnIdle string `pulumi:"autoDeleteOnIdle"`
// Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
DeadLetteringOnFilterEvaluationError bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Does the Service Bus Subscription have dead letter support when a message expires?
DeadLetteringOnMessageExpiration bool `pulumi:"deadLetteringOnMessageExpiration"`
// 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.
DefaultMessageTtl string `pulumi:"defaultMessageTtl"`
// Are batched operations enabled on this ServiceBus Subscription?
EnableBatchedOperations bool `pulumi:"enableBatchedOperations"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
ForwardTo string `pulumi:"forwardTo"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The lock duration for the subscription.
LockDuration string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount int `pulumi:"maxDeliveryCount"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
// Whether or not this ServiceBus Subscription supports session.
RequiresSession bool `pulumi:"requiresSession"`
ResourceGroupName string `pulumi:"resourceGroupName"`
TopicName string `pulumi:"topicName"`
}