@gradientedge/cdk-utils 10.1.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/lib/azure/common/constants.d.ts +3 -2
- package/dist/src/lib/azure/common/constants.js +2 -1
- package/dist/src/lib/azure/common/construct.d.ts +26 -12
- package/dist/src/lib/azure/common/construct.js +31 -45
- package/dist/src/lib/azure/common/resource-name-formatter.d.ts +9 -4
- package/dist/src/lib/azure/common/resource-name-formatter.js +9 -5
- package/dist/src/lib/azure/common/stack.d.ts +18 -32
- package/dist/src/lib/azure/common/stack.js +77 -74
- package/dist/src/lib/azure/common/tagging.d.ts +29 -8
- package/dist/src/lib/azure/common/tagging.js +72 -26
- package/dist/src/lib/azure/common/types.d.ts +19 -4
- package/dist/src/lib/azure/services/api-management/main.d.ts +29 -32
- package/dist/src/lib/azure/services/api-management/main.js +100 -121
- package/dist/src/lib/azure/services/api-management/types.d.ts +33 -18
- package/dist/src/lib/azure/services/app-configuration/main.d.ts +6 -7
- package/dist/src/lib/azure/services/app-configuration/main.js +23 -26
- package/dist/src/lib/azure/services/app-configuration/types.d.ts +2 -2
- package/dist/src/lib/azure/services/app-service/main.d.ts +10 -12
- package/dist/src/lib/azure/services/app-service/main.js +37 -49
- package/dist/src/lib/azure/services/app-service/types.d.ts +4 -4
- package/dist/src/lib/azure/services/application-insights/main.d.ts +7 -8
- package/dist/src/lib/azure/services/application-insights/main.js +20 -26
- package/dist/src/lib/azure/services/application-insights/types.d.ts +2 -4
- package/dist/src/lib/azure/services/cosmosdb/main.d.ts +12 -15
- package/dist/src/lib/azure/services/cosmosdb/main.js +42 -61
- package/dist/src/lib/azure/services/cosmosdb/types.d.ts +4 -6
- package/dist/src/lib/azure/services/dns/main.d.ts +13 -17
- package/dist/src/lib/azure/services/dns/main.js +33 -51
- package/dist/src/lib/azure/services/dns/types.d.ts +5 -8
- package/dist/src/lib/azure/services/eventgrid/main.d.ts +20 -22
- package/dist/src/lib/azure/services/eventgrid/main.js +61 -89
- package/dist/src/lib/azure/services/eventgrid/types.d.ts +7 -8
- package/dist/src/lib/azure/services/function/main.d.ts +15 -15
- package/dist/src/lib/azure/services/function/main.js +54 -59
- package/dist/src/lib/azure/services/function/types.d.ts +18 -6
- package/dist/src/lib/azure/services/index.d.ts +1 -1
- package/dist/src/lib/azure/services/index.js +1 -1
- package/dist/src/lib/azure/services/key-vault/main.d.ts +6 -7
- package/dist/src/lib/azure/services/key-vault/main.js +29 -28
- package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
- package/dist/src/lib/azure/services/monitor/main.d.ts +7 -8
- package/dist/src/lib/azure/services/monitor/main.js +10 -15
- package/dist/src/lib/azure/services/monitor/types.d.ts +2 -2
- package/dist/src/lib/azure/services/operational-insights/main.d.ts +29 -0
- package/dist/src/lib/azure/services/operational-insights/main.js +50 -0
- package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -0
- package/dist/src/lib/azure/services/redis/main.d.ts +8 -9
- package/dist/src/lib/azure/services/redis/main.js +24 -26
- package/dist/src/lib/azure/services/redis/types.d.ts +2 -2
- package/dist/src/lib/azure/services/resource-group/main.d.ts +6 -7
- package/dist/src/lib/azure/services/resource-group/main.js +9 -14
- package/dist/src/lib/azure/services/resource-group/types.d.ts +2 -2
- package/dist/src/lib/azure/services/servicebus/main.d.ts +17 -22
- package/dist/src/lib/azure/services/servicebus/main.js +47 -70
- package/dist/src/lib/azure/services/servicebus/types.d.ts +6 -10
- package/dist/src/lib/azure/services/storage/main.d.ts +24 -27
- package/dist/src/lib/azure/services/storage/main.js +70 -88
- package/dist/src/lib/azure/services/storage/types.d.ts +10 -8
- package/dist/src/lib/azure/types/index.d.ts +2 -1
- package/dist/src/lib/azure/utils/index.d.ts +19 -3
- package/dist/src/lib/azure/utils/index.js +19 -13
- package/dist/src/lib/cloudflare/common/stack.js +1 -1
- package/dist/src/lib/cloudflare/services/access/main.js +23 -23
- package/dist/src/lib/cloudflare/services/api-shield/main.js +11 -11
- package/dist/src/lib/cloudflare/services/argo/main.js +5 -5
- package/dist/src/lib/cloudflare/services/filter/main.js +3 -3
- package/dist/src/lib/cloudflare/services/firewall/main.js +3 -3
- package/dist/src/lib/cloudflare/services/page/main.js +7 -7
- package/dist/src/lib/cloudflare/services/record/main.js +3 -3
- package/dist/src/lib/cloudflare/services/rule-set/main.d.ts +1 -1
- package/dist/src/lib/cloudflare/services/rule-set/main.js +4 -5
- package/dist/src/lib/cloudflare/services/worker/main.js +13 -13
- package/dist/src/lib/cloudflare/services/zone/main.js +18 -18
- package/package.json +2 -1
- package/src/lib/azure/common/constants.ts +2 -1
- package/src/lib/azure/common/construct.ts +32 -48
- package/src/lib/azure/common/resource-name-formatter.ts +10 -6
- package/src/lib/azure/common/stack.ts +78 -78
- package/src/lib/azure/common/tagging.ts +78 -29
- package/src/lib/azure/common/types.ts +21 -4
- package/src/lib/azure/services/api-management/main.ts +172 -169
- package/src/lib/azure/services/api-management/types.ts +39 -16
- package/src/lib/azure/services/app-configuration/main.ts +33 -31
- package/src/lib/azure/services/app-configuration/types.ts +2 -2
- package/src/lib/azure/services/app-service/main.ts +61 -62
- package/src/lib/azure/services/app-service/types.ts +4 -4
- package/src/lib/azure/services/application-insights/main.ts +29 -30
- package/src/lib/azure/services/application-insights/types.ts +2 -5
- package/src/lib/azure/services/cosmosdb/main.ts +78 -77
- package/src/lib/azure/services/cosmosdb/types.ts +10 -6
- package/src/lib/azure/services/dns/main.ts +65 -72
- package/src/lib/azure/services/dns/types.ts +9 -9
- package/src/lib/azure/services/eventgrid/main.ts +120 -122
- package/src/lib/azure/services/eventgrid/types.ts +13 -8
- package/src/lib/azure/services/function/main.ts +75 -72
- package/src/lib/azure/services/function/types.ts +21 -6
- package/src/lib/azure/services/index.ts +1 -1
- package/src/lib/azure/services/key-vault/main.ts +38 -32
- package/src/lib/azure/services/key-vault/types.ts +4 -2
- package/src/lib/azure/services/monitor/main.ts +17 -21
- package/src/lib/azure/services/monitor/types.ts +2 -2
- package/src/lib/azure/services/operational-insights/main.ts +61 -0
- package/src/lib/azure/services/operational-insights/types.ts +3 -0
- package/src/lib/azure/services/redis/main.ts +30 -30
- package/src/lib/azure/services/redis/types.ts +2 -2
- package/src/lib/azure/services/resource-group/main.ts +20 -20
- package/src/lib/azure/services/resource-group/types.ts +2 -2
- package/src/lib/azure/services/servicebus/main.ts +103 -94
- package/src/lib/azure/services/servicebus/types.ts +17 -11
- package/src/lib/azure/services/storage/main.ts +113 -114
- package/src/lib/azure/services/storage/types.ts +16 -8
- package/src/lib/azure/types/index.ts +2 -1
- package/src/lib/azure/utils/index.ts +20 -22
- package/src/lib/cloudflare/common/stack.ts +1 -1
- package/src/lib/cloudflare/services/access/main.ts +114 -58
- package/src/lib/cloudflare/services/api-shield/main.ts +48 -22
- package/src/lib/cloudflare/services/argo/main.ts +17 -9
- package/src/lib/cloudflare/services/filter/main.ts +9 -5
- package/src/lib/cloudflare/services/firewall/main.ts +9 -5
- package/src/lib/cloudflare/services/page/main.ts +27 -15
- package/src/lib/cloudflare/services/record/main.ts +9 -5
- package/src/lib/cloudflare/services/rule-set/main.ts +10 -8
- package/src/lib/cloudflare/services/worker/main.ts +60 -29
- package/src/lib/cloudflare/services/zone/main.ts +75 -35
- package/dist/src/lib/azure/services/log-analytics-workspace/main.d.ts +0 -30
- package/dist/src/lib/azure/services/log-analytics-workspace/main.js +0 -55
- package/dist/src/lib/azure/services/log-analytics-workspace/types.d.ts +0 -3
- package/src/lib/azure/services/log-analytics-workspace/main.ts +0 -61
- package/src/lib/azure/services/log-analytics-workspace/types.ts +0 -3
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.d.ts +0 -0
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.js +0 -0
- /package/dist/src/lib/azure/services/{log-analytics-workspace → operational-insights}/types.js +0 -0
- /package/src/lib/azure/services/{log-analytics-workspace → operational-insights}/index.ts +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { ResourceGroup } from '@
|
|
1
|
+
import { ResourceGroup } from '@pulumi/azure-native/resources/index.js'
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js'
|
|
3
|
-
import { createAzureTfOutput } from '../../utils/index.js'
|
|
4
3
|
import { ResourceGroupProps } from './types.js'
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
|
-
* @classdesc Provides operations on Azure Resource Group
|
|
6
|
+
* @classdesc Provides operations on Azure Resource Group using Pulumi
|
|
8
7
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
9
8
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
10
9
|
* @example
|
|
11
|
-
* ```
|
|
10
|
+
* ```typescript
|
|
12
11
|
* import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
|
|
13
12
|
*
|
|
14
13
|
* class CustomConstruct extends CommonAzureConstruct {
|
|
15
|
-
* constructor(
|
|
16
|
-
* super(
|
|
14
|
+
* constructor(name: string, props: CommonAzureStackProps) {
|
|
15
|
+
* super(name, props)
|
|
17
16
|
* this.props = props
|
|
18
17
|
* this.resourceGroupManager.createResourceGroup('MyResourceGroup', this, props)
|
|
19
18
|
* }
|
|
@@ -26,24 +25,25 @@ export class AzureResourceGroupManager {
|
|
|
26
25
|
* @param id scoped id of the resource
|
|
27
26
|
* @param scope scope in which this resource is defined
|
|
28
27
|
* @param props resource group properties
|
|
29
|
-
* @see [
|
|
28
|
+
* @see [Pulumi Azure Native Resource Group]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/resources/resourcegroup/}
|
|
30
29
|
*/
|
|
31
30
|
public createResourceGroup(id: string, scope: CommonAzureConstruct, props: ResourceGroupProps) {
|
|
32
31
|
if (!props) throw `Props undefined for ${id}`
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
return new ResourceGroup(
|
|
34
|
+
`${id}-rg`,
|
|
35
|
+
{
|
|
36
|
+
...props,
|
|
37
|
+
resourceGroupName: scope.resourceNameFormatter.format(
|
|
38
|
+
props.resourceGroupName?.toString(),
|
|
39
|
+
scope.props.resourceNameOptions?.resourceGroup
|
|
40
|
+
),
|
|
41
|
+
location: props.location,
|
|
42
|
+
tags: props.tags ?? {
|
|
43
|
+
environment: scope.props.stage,
|
|
44
|
+
},
|
|
40
45
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
createAzureTfOutput(`${id}-resourceGroupName`, scope, resourceGroup.name)
|
|
44
|
-
createAzureTfOutput(`${id}-resourceGroupFriendlyUniqueId`, scope, resourceGroup.friendlyUniqueId)
|
|
45
|
-
createAzureTfOutput(`${id}-resourceGroupId`, scope, resourceGroup.id)
|
|
46
|
-
|
|
47
|
-
return resourceGroup
|
|
46
|
+
{ parent: scope }
|
|
47
|
+
)
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResourceGroupArgs } from '@pulumi/azure-native/resources/index.js'
|
|
2
2
|
|
|
3
|
-
export interface ResourceGroupProps extends
|
|
3
|
+
export interface ResourceGroupProps extends ResourceGroupArgs {}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
getQueueOutput,
|
|
3
|
+
ManagedServiceIdentityType,
|
|
4
|
+
Namespace,
|
|
5
|
+
Queue,
|
|
6
|
+
SkuName,
|
|
7
|
+
Subscription,
|
|
8
|
+
Topic,
|
|
9
|
+
} from '@pulumi/azure-native/servicebus/index.js'
|
|
7
10
|
import { CommonAzureConstruct } from '../../common/index.js'
|
|
8
|
-
import { createAzureTfOutput } from '../../utils/index.js'
|
|
9
11
|
import {
|
|
10
|
-
|
|
12
|
+
ResolveServicebusQueueProps,
|
|
11
13
|
ServicebusNamespaceProps,
|
|
12
14
|
ServicebusQueueProps,
|
|
13
15
|
ServicebusSubscriptionProps,
|
|
@@ -15,16 +17,16 @@ import {
|
|
|
15
17
|
} from './types.js'
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
|
-
* @classdesc Provides operations on Azure Servicebus
|
|
20
|
+
* @classdesc Provides operations on Azure Servicebus using Pulumi
|
|
19
21
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
20
22
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
21
23
|
* @example
|
|
22
|
-
* ```
|
|
24
|
+
* ```typescript
|
|
23
25
|
* import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
|
|
24
26
|
*
|
|
25
27
|
* class CustomConstruct extends CommonAzureConstruct {
|
|
26
|
-
* constructor(
|
|
27
|
-
* super(
|
|
28
|
+
* constructor(name: string, props: CommonAzureStackProps) {
|
|
29
|
+
* super(name, props)
|
|
28
30
|
* this.props = props
|
|
29
31
|
* this.ServicebusManager.createServicebusTopic('MyServicebusTopic', this, props)
|
|
30
32
|
* }
|
|
@@ -37,38 +39,40 @@ export class AzureServicebusManager {
|
|
|
37
39
|
* @param id scoped id of the resource
|
|
38
40
|
* @param scope scope in which this resource is defined
|
|
39
41
|
* @param props servicebus namespace properties
|
|
40
|
-
* @see [
|
|
42
|
+
* @see [Pulumi Azure Native Service Bus Namespace]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/namespace/}
|
|
41
43
|
*/
|
|
42
44
|
public createServicebusNamespace(id: string, scope: CommonAzureConstruct, props: ServicebusNamespaceProps) {
|
|
43
45
|
if (!props) throw `Props undefined for ${id}`
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
// Get resource group name
|
|
48
|
+
const resourceGroupName = scope.props.resourceGroupName
|
|
49
|
+
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
50
|
+
: props.resourceGroupName
|
|
51
|
+
|
|
52
|
+
if (!resourceGroupName) throw `Resource group name undefined for ${id}`
|
|
53
|
+
|
|
54
|
+
return new Namespace(
|
|
55
|
+
`${id}-sn`,
|
|
56
|
+
{
|
|
57
|
+
...props,
|
|
58
|
+
namespaceName: scope.resourceNameFormatter.format(
|
|
59
|
+
props.namespaceName?.toString(),
|
|
60
|
+
scope.props.resourceNameOptions?.serviceBusNamespace
|
|
61
|
+
),
|
|
62
|
+
resourceGroupName: resourceGroupName,
|
|
63
|
+
location: props.location ?? scope.props.location,
|
|
64
|
+
identity: props.identity ?? {
|
|
65
|
+
type: ManagedServiceIdentityType.SystemAssigned,
|
|
66
|
+
},
|
|
67
|
+
sku: props.sku ?? {
|
|
68
|
+
name: SkuName.Standard,
|
|
69
|
+
},
|
|
70
|
+
tags: props.tags ?? {
|
|
71
|
+
environment: scope.props.stage,
|
|
72
|
+
},
|
|
64
73
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
createAzureTfOutput(`${id}-servicebusNamespaceName`, scope, servicebusNamespace.name)
|
|
68
|
-
createAzureTfOutput(`${id}-servicebusNamespaceFriendlyUniqueId`, scope, servicebusNamespace.friendlyUniqueId)
|
|
69
|
-
createAzureTfOutput(`${id}-servicebusNamespaceId`, scope, servicebusNamespace.id)
|
|
70
|
-
|
|
71
|
-
return servicebusNamespace
|
|
74
|
+
{ parent: scope }
|
|
75
|
+
)
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
/**
|
|
@@ -76,22 +80,24 @@ export class AzureServicebusManager {
|
|
|
76
80
|
* @param id scoped id of the resource
|
|
77
81
|
* @param scope scope in which this resource is defined
|
|
78
82
|
* @param props servicebus topic properties
|
|
79
|
-
* @see [
|
|
83
|
+
* @see [Pulumi Azure Native Service Bus Topic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/topic/}
|
|
80
84
|
*/
|
|
81
85
|
public createServicebusTopic(id: string, scope: CommonAzureConstruct, props: ServicebusTopicProps) {
|
|
82
86
|
if (!props) throw `Props undefined for ${id}`
|
|
83
87
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
return new Topic(
|
|
89
|
+
`${id}-st`,
|
|
90
|
+
{
|
|
91
|
+
...props,
|
|
92
|
+
topicName: scope.resourceNameFormatter.format(
|
|
93
|
+
props.topicName?.toString(),
|
|
94
|
+
scope.props.resourceNameOptions?.serviceBusTopic
|
|
95
|
+
),
|
|
96
|
+
namespaceName: props.namespaceName,
|
|
97
|
+
resourceGroupName: props.resourceGroupName,
|
|
98
|
+
},
|
|
99
|
+
{ parent: scope }
|
|
100
|
+
)
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
/**
|
|
@@ -99,26 +105,28 @@ export class AzureServicebusManager {
|
|
|
99
105
|
* @param id scoped id of the resource
|
|
100
106
|
* @param scope scope in which this resource is defined
|
|
101
107
|
* @param props servicebus queue properties
|
|
102
|
-
* @see [
|
|
108
|
+
* @see [Pulumi Azure Native Service Bus Queue]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/queue/}
|
|
103
109
|
*/
|
|
104
110
|
public createServicebusQueue(id: string, scope: CommonAzureConstruct, props: ServicebusQueueProps) {
|
|
105
111
|
if (!props) throw `Props undefined for ${id}`
|
|
106
112
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
return new Queue(
|
|
114
|
+
`${id}-sq`,
|
|
115
|
+
{
|
|
116
|
+
...props,
|
|
117
|
+
queueName: scope.resourceNameFormatter.format(
|
|
118
|
+
props.queueName?.toString(),
|
|
119
|
+
scope.props.resourceNameOptions?.serviceBusQueue
|
|
120
|
+
),
|
|
121
|
+
namespaceName: props.namespaceName,
|
|
122
|
+
resourceGroupName: props.resourceGroupName,
|
|
123
|
+
duplicateDetectionHistoryTimeWindow: props.duplicateDetectionHistoryTimeWindow ?? 'PT1M',
|
|
124
|
+
requiresDuplicateDetection: props.requiresDuplicateDetection ?? true,
|
|
125
|
+
deadLetteringOnMessageExpiration: props.deadLetteringOnMessageExpiration ?? true,
|
|
126
|
+
defaultMessageTimeToLive: (props as any).defaultMessageTtl ?? 'P2D',
|
|
127
|
+
},
|
|
128
|
+
{ parent: scope }
|
|
129
|
+
)
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
/**
|
|
@@ -126,44 +134,45 @@ export class AzureServicebusManager {
|
|
|
126
134
|
* @param id scoped id of the resource
|
|
127
135
|
* @param scope scope in which this resource is defined
|
|
128
136
|
* @param props servicebus subscription properties
|
|
129
|
-
* @see [
|
|
137
|
+
* @see [Pulumi Azure Native Service Bus Subscription]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/subscription/}
|
|
130
138
|
*/
|
|
131
139
|
public createServicebusSubscription(id: string, scope: CommonAzureConstruct, props: ServicebusSubscriptionProps) {
|
|
132
140
|
if (!props) throw `Props undefined for ${id}`
|
|
133
141
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
return new Subscription(
|
|
143
|
+
`${id}-ss`,
|
|
144
|
+
{
|
|
145
|
+
...props,
|
|
146
|
+
subscriptionName: scope.resourceNameFormatter.format(
|
|
147
|
+
props.subscriptionName?.toString(),
|
|
148
|
+
scope.props.resourceNameOptions?.serviceBusSubscription
|
|
149
|
+
),
|
|
150
|
+
maxDeliveryCount: props.maxDeliveryCount ?? 1,
|
|
151
|
+
},
|
|
152
|
+
{ parent: scope }
|
|
153
|
+
)
|
|
145
154
|
}
|
|
146
155
|
|
|
147
156
|
/**
|
|
148
|
-
* @summary Method to resolve
|
|
157
|
+
* @summary Method to resolve an existing servicebus queue
|
|
149
158
|
* @param id scoped id of the resource
|
|
150
159
|
* @param scope scope in which this resource is defined
|
|
151
|
-
* @param props servicebus queue properties
|
|
152
|
-
* @see [
|
|
160
|
+
* @param props servicebus queue properties for lookup
|
|
161
|
+
* @see [Pulumi Azure Native Service Bus Queue Lookup]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/queue/}
|
|
153
162
|
*/
|
|
154
|
-
public resolveServicebusQueue(id: string, scope: CommonAzureConstruct, props:
|
|
163
|
+
public resolveServicebusQueue(id: string, scope: CommonAzureConstruct, props: ResolveServicebusQueueProps) {
|
|
155
164
|
if (!props) throw `Props undefined for ${id}`
|
|
156
165
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
return getQueueOutput(
|
|
167
|
+
{
|
|
168
|
+
queueName: scope.resourceNameFormatter.format(
|
|
169
|
+
props.queueName?.toString(),
|
|
170
|
+
scope.props.resourceNameOptions?.serviceBusQueue
|
|
171
|
+
),
|
|
172
|
+
namespaceName: props.namespaceName,
|
|
173
|
+
resourceGroupName: props.resourceGroupName,
|
|
174
|
+
},
|
|
175
|
+
{ parent: scope }
|
|
176
|
+
)
|
|
168
177
|
}
|
|
169
178
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
export interface
|
|
1
|
+
import {
|
|
2
|
+
GetQueueOutputArgs,
|
|
3
|
+
NamespaceArgs,
|
|
4
|
+
QueueArgs,
|
|
5
|
+
SubscriptionArgs,
|
|
6
|
+
TopicArgs,
|
|
7
|
+
} from '@pulumi/azure-native/servicebus/index.js'
|
|
8
|
+
|
|
9
|
+
export interface ServicebusNamespaceProps extends NamespaceArgs {}
|
|
10
|
+
|
|
11
|
+
export interface ServicebusTopicProps extends TopicArgs {}
|
|
12
|
+
|
|
13
|
+
export interface ServicebusQueueProps extends QueueArgs {}
|
|
14
|
+
|
|
15
|
+
export interface ServicebusSubscriptionProps extends SubscriptionArgs {}
|
|
16
|
+
|
|
17
|
+
export interface ResolveServicebusQueueProps extends GetQueueOutputArgs {}
|