/
endpointServicebusQueue.go
109 lines (96 loc) · 5.19 KB
/
endpointServicebusQueue.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// *** 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! ***
// nolint: lll
package iot
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages an IotHub ServiceBus Queue Endpoint
//
// > **NOTE:** Endpoints can be defined either directly on the `iot.IoTHub` resource, or using the `azurerm_iothub_endpoint_*` resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a `azurerm_iothub_endpoint_*` resource and another endpoint of a different type directly on the `iot.IoTHub` resource is not supported.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/iothub_endpoint_servicebus_queue.html.markdown.
type EndpointServicebusQueue struct {
pulumi.CustomResourceState
// The connection string for the endpoint.
ConnectionString pulumi.StringOutput `pulumi:"connectionString"`
IothubName pulumi.StringOutput `pulumi:"iothubName"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`.
Name pulumi.StringOutput `pulumi:"name"`
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewEndpointServicebusQueue registers a new resource with the given unique name, arguments, and options.
func NewEndpointServicebusQueue(ctx *pulumi.Context,
name string, args *EndpointServicebusQueueArgs, opts ...pulumi.ResourceOption) (*EndpointServicebusQueue, error) {
if args == nil || args.ConnectionString == nil {
return nil, errors.New("missing required argument 'ConnectionString'")
}
if args == nil || args.IothubName == nil {
return nil, errors.New("missing required argument 'IothubName'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil {
args = &EndpointServicebusQueueArgs{}
}
var resource EndpointServicebusQueue
err := ctx.RegisterResource("azure:iot/endpointServicebusQueue:EndpointServicebusQueue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointServicebusQueue gets an existing EndpointServicebusQueue resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpointServicebusQueue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointServicebusQueueState, opts ...pulumi.ResourceOption) (*EndpointServicebusQueue, error) {
var resource EndpointServicebusQueue
err := ctx.ReadResource("azure:iot/endpointServicebusQueue:EndpointServicebusQueue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointServicebusQueue resources.
type endpointServicebusQueueState struct {
// The connection string for the endpoint.
ConnectionString *string `pulumi:"connectionString"`
IothubName *string `pulumi:"iothubName"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`.
Name *string `pulumi:"name"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type EndpointServicebusQueueState struct {
// The connection string for the endpoint.
ConnectionString pulumi.StringPtrInput
IothubName pulumi.StringPtrInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`.
Name pulumi.StringPtrInput
ResourceGroupName pulumi.StringPtrInput
}
func (EndpointServicebusQueueState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusQueueState)(nil)).Elem()
}
type endpointServicebusQueueArgs struct {
// The connection string for the endpoint.
ConnectionString string `pulumi:"connectionString"`
IothubName string `pulumi:"iothubName"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`.
Name *string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a EndpointServicebusQueue resource.
type EndpointServicebusQueueArgs struct {
// The connection string for the endpoint.
ConnectionString pulumi.StringInput
IothubName pulumi.StringInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`.
Name pulumi.StringPtrInput
ResourceGroupName pulumi.StringInput
}
func (EndpointServicebusQueueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusQueueArgs)(nil)).Elem()
}