@gradientedge/cdk-utils 10.7.0 → 10.8.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.
Files changed (198) hide show
  1. package/dist/app/api-destined-function/src/lib/lambda.d.ts +1 -0
  2. package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
  3. package/dist/app/api-destined-function/src/lib/lambda.js +1 -0
  4. package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
  5. package/dist/app/api-destined-function/tsconfig.tsbuildinfo +1 -0
  6. package/dist/src/lib/aws/services/cloudwatch/main.d.ts +11 -11
  7. package/dist/src/lib/azure/common/constants.d.ts +74 -0
  8. package/dist/src/lib/azure/common/constants.js +77 -0
  9. package/dist/src/lib/azure/common/construct.d.ts +15 -3
  10. package/dist/src/lib/azure/common/construct.js +39 -3
  11. package/dist/src/lib/azure/common/stack.d.ts +3 -2
  12. package/dist/src/lib/azure/common/stack.js +25 -42
  13. package/dist/src/lib/azure/common/types.d.ts +13 -2
  14. package/dist/src/lib/azure/construct/event-handler/index.d.ts +2 -0
  15. package/dist/src/lib/azure/construct/event-handler/index.js +2 -0
  16. package/dist/src/lib/azure/construct/event-handler/main.d.ts +20 -0
  17. package/dist/src/lib/azure/construct/event-handler/main.js +139 -0
  18. package/dist/src/lib/azure/construct/event-handler/types.d.ts +35 -0
  19. package/dist/src/lib/azure/construct/event-handler/types.js +1 -0
  20. package/dist/src/lib/azure/construct/function-app/index.d.ts +2 -0
  21. package/dist/src/lib/azure/construct/function-app/index.js +2 -0
  22. package/dist/src/lib/azure/construct/function-app/main.d.ts +51 -0
  23. package/dist/src/lib/azure/construct/function-app/main.js +297 -0
  24. package/dist/src/lib/azure/construct/function-app/types.d.ts +33 -0
  25. package/dist/src/lib/azure/construct/function-app/types.js +1 -0
  26. package/dist/src/lib/azure/construct/index.d.ts +6 -0
  27. package/dist/src/lib/azure/construct/index.js +6 -0
  28. package/dist/src/lib/azure/construct/rest-api/index.d.ts +2 -0
  29. package/dist/src/lib/azure/construct/rest-api/index.js +2 -0
  30. package/dist/src/lib/azure/construct/rest-api/main.d.ts +20 -0
  31. package/dist/src/lib/azure/construct/rest-api/main.js +172 -0
  32. package/dist/src/lib/azure/construct/rest-api/types.d.ts +25 -0
  33. package/dist/src/lib/azure/construct/rest-api/types.js +1 -0
  34. package/dist/src/lib/azure/construct/rest-api-function/index.d.ts +2 -0
  35. package/dist/src/lib/azure/construct/rest-api-function/index.js +2 -0
  36. package/dist/src/lib/azure/construct/rest-api-function/main.d.ts +19 -0
  37. package/dist/src/lib/azure/construct/rest-api-function/main.js +255 -0
  38. package/dist/src/lib/azure/construct/rest-api-function/types.d.ts +29 -0
  39. package/dist/src/lib/azure/construct/rest-api-function/types.js +1 -0
  40. package/dist/src/lib/azure/construct/rest-api-with-cache/index.d.ts +2 -0
  41. package/dist/src/lib/azure/construct/rest-api-with-cache/index.js +2 -0
  42. package/dist/src/lib/azure/construct/rest-api-with-cache/main.d.ts +12 -0
  43. package/dist/src/lib/azure/construct/rest-api-with-cache/main.js +56 -0
  44. package/dist/src/lib/azure/construct/rest-api-with-cache/types.d.ts +13 -0
  45. package/dist/src/lib/azure/construct/rest-api-with-cache/types.js +1 -0
  46. package/dist/src/lib/azure/construct/site-with-webapp/index.d.ts +2 -0
  47. package/dist/src/lib/azure/construct/site-with-webapp/index.js +2 -0
  48. package/dist/src/lib/azure/construct/site-with-webapp/main.d.ts +19 -0
  49. package/dist/src/lib/azure/construct/site-with-webapp/main.js +135 -0
  50. package/dist/src/lib/azure/construct/site-with-webapp/types.d.ts +30 -0
  51. package/dist/src/lib/azure/construct/site-with-webapp/types.js +1 -0
  52. package/dist/src/lib/azure/index.d.ts +1 -0
  53. package/dist/src/lib/azure/index.js +1 -0
  54. package/dist/src/lib/azure/services/api-management/main.d.ts +83 -5
  55. package/dist/src/lib/azure/services/api-management/main.js +114 -148
  56. package/dist/src/lib/azure/services/api-management/types.d.ts +22 -1
  57. package/dist/src/lib/azure/services/app-configuration/main.d.ts +13 -1
  58. package/dist/src/lib/azure/services/app-configuration/main.js +21 -2
  59. package/dist/src/lib/azure/services/app-service/main.d.ts +5 -2
  60. package/dist/src/lib/azure/services/app-service/main.js +12 -4
  61. package/dist/src/lib/azure/services/application-insights/main.d.ts +15 -4
  62. package/dist/src/lib/azure/services/application-insights/main.js +27 -6
  63. package/dist/src/lib/azure/services/application-insights/types.d.ts +4 -1
  64. package/dist/src/lib/azure/services/authorisation/constants.d.ts +13 -0
  65. package/dist/src/lib/azure/services/authorisation/constants.js +14 -0
  66. package/dist/src/lib/azure/services/authorisation/index.d.ts +3 -0
  67. package/dist/src/lib/azure/services/authorisation/index.js +3 -0
  68. package/dist/src/lib/azure/services/authorisation/main.d.ts +84 -0
  69. package/dist/src/lib/azure/services/authorisation/main.js +120 -0
  70. package/dist/src/lib/azure/services/authorisation/types.d.ts +3 -0
  71. package/dist/src/lib/azure/services/authorisation/types.js +1 -0
  72. package/dist/src/lib/azure/services/cosmosdb/constants.d.ts +8 -0
  73. package/dist/src/lib/azure/services/cosmosdb/constants.js +10 -0
  74. package/dist/src/lib/azure/services/cosmosdb/index.d.ts +1 -0
  75. package/dist/src/lib/azure/services/cosmosdb/index.js +1 -0
  76. package/dist/src/lib/azure/services/cosmosdb/main.d.ts +47 -5
  77. package/dist/src/lib/azure/services/cosmosdb/main.js +77 -8
  78. package/dist/src/lib/azure/services/cosmosdb/types.d.ts +3 -1
  79. package/dist/src/lib/azure/services/dns/main.d.ts +9 -4
  80. package/dist/src/lib/azure/services/dns/main.js +12 -8
  81. package/dist/src/lib/azure/services/eventgrid/main.d.ts +12 -7
  82. package/dist/src/lib/azure/services/eventgrid/main.js +18 -19
  83. package/dist/src/lib/azure/services/function/main.d.ts +16 -3
  84. package/dist/src/lib/azure/services/function/main.js +122 -8
  85. package/dist/src/lib/azure/services/function/types.d.ts +3 -4
  86. package/dist/src/lib/azure/services/index.d.ts +3 -0
  87. package/dist/src/lib/azure/services/index.js +3 -0
  88. package/dist/src/lib/azure/services/key-vault/main.d.ts +22 -2
  89. package/dist/src/lib/azure/services/key-vault/main.js +28 -3
  90. package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
  91. package/dist/src/lib/azure/services/monitor/main.d.ts +3 -1
  92. package/dist/src/lib/azure/services/monitor/main.js +3 -2
  93. package/dist/src/lib/azure/services/operational-insights/main.d.ts +13 -2
  94. package/dist/src/lib/azure/services/operational-insights/main.js +17 -3
  95. package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -1
  96. package/dist/src/lib/azure/services/portal/error.d.ts +5 -0
  97. package/dist/src/lib/azure/services/portal/error.js +10 -0
  98. package/dist/src/lib/azure/services/portal/index.d.ts +4 -0
  99. package/dist/src/lib/azure/services/portal/index.js +4 -0
  100. package/dist/src/lib/azure/services/portal/main.d.ts +33 -0
  101. package/dist/src/lib/azure/services/portal/main.js +51 -0
  102. package/dist/src/lib/azure/services/portal/renderer.d.ts +11 -0
  103. package/dist/src/lib/azure/services/portal/renderer.js +156 -0
  104. package/dist/src/lib/azure/services/portal/types.d.ts +40 -0
  105. package/dist/src/lib/azure/services/portal/types.js +1 -0
  106. package/dist/src/lib/azure/services/redis/main.d.ts +4 -2
  107. package/dist/src/lib/azure/services/redis/main.js +3 -2
  108. package/dist/src/lib/azure/services/redis/types.d.ts +1 -1
  109. package/dist/src/lib/azure/services/resource-group/main.d.ts +10 -1
  110. package/dist/src/lib/azure/services/resource-group/main.js +17 -3
  111. package/dist/src/lib/azure/services/security-center/index.d.ts +2 -0
  112. package/dist/src/lib/azure/services/security-center/index.js +2 -0
  113. package/dist/src/lib/azure/services/security-center/main.d.ts +31 -0
  114. package/dist/src/lib/azure/services/security-center/main.js +33 -0
  115. package/dist/src/lib/azure/services/security-center/types.d.ts +3 -0
  116. package/dist/src/lib/azure/services/security-center/types.js +1 -0
  117. package/dist/src/lib/azure/services/servicebus/main.d.ts +28 -22
  118. package/dist/src/lib/azure/services/servicebus/main.js +31 -26
  119. package/dist/src/lib/azure/services/servicebus/types.d.ts +4 -4
  120. package/dist/src/lib/azure/services/storage/main.d.ts +26 -5
  121. package/dist/src/lib/azure/services/storage/main.js +51 -9
  122. package/dist/src/lib/azure/services/storage/types.d.ts +7 -2
  123. package/dist/src/lib/cloudflare/common/stack.d.ts +2 -2
  124. package/dist/src/lib/cloudflare/common/stack.js +25 -25
  125. package/dist/src/lib/cloudflare/services/worker/main.js +8 -1
  126. package/dist/src/lib/cloudflare/services/worker/types.d.ts +1 -0
  127. package/package.json +26 -23
  128. package/src/lib/azure/common/constants.ts +83 -0
  129. package/src/lib/azure/common/construct.ts +49 -6
  130. package/src/lib/azure/common/stack.ts +26 -43
  131. package/src/lib/azure/common/types.ts +14 -2
  132. package/src/lib/azure/construct/event-handler/index.ts +2 -0
  133. package/src/lib/azure/construct/event-handler/main.ts +183 -0
  134. package/src/lib/azure/construct/event-handler/types.ts +49 -0
  135. package/src/lib/azure/construct/function-app/index.ts +2 -0
  136. package/src/lib/azure/construct/function-app/main.ts +410 -0
  137. package/src/lib/azure/construct/function-app/types.ts +45 -0
  138. package/src/lib/azure/construct/index.ts +6 -0
  139. package/src/lib/azure/construct/rest-api/index.ts +2 -0
  140. package/src/lib/azure/construct/rest-api/main.ts +205 -0
  141. package/src/lib/azure/construct/rest-api/types.ts +33 -0
  142. package/src/lib/azure/construct/rest-api-function/index.ts +2 -0
  143. package/src/lib/azure/construct/rest-api-function/main.ts +297 -0
  144. package/src/lib/azure/construct/rest-api-function/types.ts +39 -0
  145. package/src/lib/azure/construct/rest-api-with-cache/index.ts +2 -0
  146. package/src/lib/azure/construct/rest-api-with-cache/main.ts +75 -0
  147. package/src/lib/azure/construct/rest-api-with-cache/types.ts +15 -0
  148. package/src/lib/azure/construct/site-with-webapp/index.ts +2 -0
  149. package/src/lib/azure/construct/site-with-webapp/main.ts +160 -0
  150. package/src/lib/azure/construct/site-with-webapp/types.ts +33 -0
  151. package/src/lib/azure/index.ts +1 -0
  152. package/src/lib/azure/services/api-management/main.ts +168 -152
  153. package/src/lib/azure/services/api-management/types.ts +30 -1
  154. package/src/lib/azure/services/app-configuration/main.ts +29 -2
  155. package/src/lib/azure/services/app-service/main.ts +23 -4
  156. package/src/lib/azure/services/application-insights/main.ts +46 -7
  157. package/src/lib/azure/services/application-insights/types.ts +6 -2
  158. package/src/lib/azure/services/authorisation/constants.ts +13 -0
  159. package/src/lib/azure/services/authorisation/index.ts +3 -0
  160. package/src/lib/azure/services/authorisation/main.ts +202 -0
  161. package/src/lib/azure/services/authorisation/types.ts +3 -0
  162. package/src/lib/azure/services/cosmosdb/constants.ts +9 -0
  163. package/src/lib/azure/services/cosmosdb/index.ts +1 -0
  164. package/src/lib/azure/services/cosmosdb/main.ts +158 -8
  165. package/src/lib/azure/services/cosmosdb/types.ts +3 -0
  166. package/src/lib/azure/services/dns/main.ts +33 -8
  167. package/src/lib/azure/services/eventgrid/main.ts +41 -23
  168. package/src/lib/azure/services/function/main.ts +155 -9
  169. package/src/lib/azure/services/function/types.ts +3 -4
  170. package/src/lib/azure/services/index.ts +3 -0
  171. package/src/lib/azure/services/key-vault/main.ts +47 -4
  172. package/src/lib/azure/services/key-vault/types.ts +4 -4
  173. package/src/lib/azure/services/monitor/main.ts +5 -2
  174. package/src/lib/azure/services/operational-insights/main.ts +30 -4
  175. package/src/lib/azure/services/operational-insights/types.ts +3 -1
  176. package/src/lib/azure/services/portal/error.ts +12 -0
  177. package/src/lib/azure/services/portal/index.ts +4 -0
  178. package/src/lib/azure/services/portal/main.ts +81 -0
  179. package/src/lib/azure/services/portal/renderer.ts +182 -0
  180. package/src/lib/azure/services/portal/types.ts +45 -0
  181. package/src/lib/azure/services/redis/main.ts +10 -3
  182. package/src/lib/azure/services/redis/types.ts +1 -1
  183. package/src/lib/azure/services/resource-group/main.ts +34 -3
  184. package/src/lib/azure/services/security-center/index.ts +2 -0
  185. package/src/lib/azure/services/security-center/main.ts +42 -0
  186. package/src/lib/azure/services/security-center/types.ts +3 -0
  187. package/src/lib/azure/services/servicebus/main.ts +61 -30
  188. package/src/lib/azure/services/servicebus/types.ts +4 -4
  189. package/src/lib/azure/services/storage/main.ts +91 -9
  190. package/src/lib/azure/services/storage/types.ts +11 -2
  191. package/src/lib/cloudflare/common/stack.ts +25 -25
  192. package/src/lib/cloudflare/services/worker/main.ts +10 -1
  193. package/src/lib/cloudflare/services/worker/types.ts +8 -1
  194. package/dist/lib/lambda.d.ts +0 -17
  195. package/dist/lib/lambda.d.ts.map +0 -1
  196. package/dist/lib/lambda.js +0 -28
  197. package/dist/lib/lambda.js.map +0 -1
  198. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @summary Enumerations for publicly available built in RBAC roles
3
+ * @see https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
4
+ */
5
+ export var RoleDefinitionId;
6
+ (function (RoleDefinitionId) {
7
+ RoleDefinitionId["APP_CONFIGURATION_DATA_READER"] = "/providers/Microsoft.Authorization/roleDefinitions/516239f1-63e1-4d78-a4de-a74fb236a071";
8
+ RoleDefinitionId["APP_CONFIGURATION_DATA_OWNER"] = "/providers/Microsoft.Authorization/roleDefinitions/5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b";
9
+ RoleDefinitionId["EVENTGRID_DATA_SENDER"] = "/providers/Microsoft.Authorization/roleDefinitions/d5a91429-5739-47e2-a06b-3470a27159e7";
10
+ RoleDefinitionId["KEY_VAULT_CERTIFICATE_USER"] = "/providers/Microsoft.Authorization/roleDefinitions/db79e9a7-68ee-4b58-9aeb-b90e7c24fcba";
11
+ RoleDefinitionId["KEY_VAULT_SECRETS_USER"] = "/providers/Microsoft.Authorization/roleDefinitions/4633458b-17de-408a-b874-0445c86b69e6";
12
+ RoleDefinitionId["STORAGE_BLOB_DATA_CONTRIBUTOR"] = "/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe";
13
+ RoleDefinitionId["STORAGE_TABLE_DATA_CONTRIBUTOR"] = "/providers/Microsoft.Authorization/roleDefinitions/0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3";
14
+ })(RoleDefinitionId || (RoleDefinitionId = {}));
@@ -0,0 +1,3 @@
1
+ export * from './constants.js';
2
+ export * from './main.js';
3
+ export * from './types.js';
@@ -0,0 +1,3 @@
1
+ export * from './constants.js';
2
+ export * from './main.js';
3
+ export * from './types.js';
@@ -0,0 +1,84 @@
1
+ import { Input, ResourceOptions } from '@pulumi/pulumi';
2
+ import { CommonAzureConstruct } from '../../common/index.js';
3
+ import { RoleDefinitionId } from './constants.js';
4
+ import { RoleAssignmentProps } from './types.js';
5
+ /**
6
+ * @classdesc Provides operations on Azure Authorisation using Pulumi
7
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
8
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
9
+ * @example
10
+ * ```typescript
11
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
12
+ *
13
+ * class CustomConstruct extends CommonAzureConstruct {
14
+ * constructor(name: string, props: CommonAzureStackProps) {
15
+ * super(name, props)
16
+ * this.props = props
17
+ * this.authorisationManager.createRoleAssignment('MyRoleAssignment', this, props)
18
+ * }
19
+ * }
20
+ * ```
21
+ */
22
+ export declare class AzureAuthorisationManager {
23
+ /**
24
+ * @summary Method to create a new role assignment
25
+ * @param id scoped id of the resource
26
+ * @param scope scope in which this resource is defined
27
+ * @param props Role assignment properties
28
+ * @param resourceOptions Optional settings to control resource behaviour
29
+ * @see [Pulumi Azure Native Role Assignment]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/authorization/roleassignment/}
30
+ */
31
+ createRoleAssignment(id: string, scope: CommonAzureConstruct, props: RoleAssignmentProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
32
+ /**
33
+ * @summary Method to grant a role assignment to key vault
34
+ * @param id scoped id of the resource
35
+ * @param scope scope in which this resource is defined
36
+ * @param vaultName the key vault name
37
+ * @param resourceGroupName the resource group name
38
+ * @param principalId the principal id to which the role is assigned to
39
+ * @param roleDefinitionId the role definition id
40
+ * @param resourceOptions Optional settings to control resource behaviour
41
+ */
42
+ grantRoleAssignmentToKeyVault(id: string, scope: CommonAzureConstruct, vaultName: string, resourceGroupName: string, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
43
+ /**
44
+ * @summary Method to grant a role assignment to event grid topic
45
+ * @param id scoped id of the resource
46
+ * @param scope scope in which this resource is defined
47
+ * @param topicName the topic name
48
+ * @param resourceGroupName the resource group name
49
+ * @param principalId the principal id to which the role is assigned to
50
+ * @param roleDefinitionId the role definition id
51
+ * @param resourceOptions Optional settings to control resource behaviour
52
+ */
53
+ grantRoleAssignmentToEventgridTopic(id: string, scope: CommonAzureConstruct, topicName: string, resourceGroupName: string, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
54
+ /**
55
+ * @summary Method to grant a role assignment to application configuration
56
+ * @param id scoped id of the resource
57
+ * @param scope scope in which this resource is defined
58
+ * @param appConfigId the application configuration id
59
+ * @param principalId the principal id to which the role is assigned to
60
+ * @param roleDefinitionId the role definition id
61
+ * @param resourceOptions Optional settings to control resource behaviour
62
+ */
63
+ grantRoleAssignmentToApplicationConfiguration(id: string, scope: CommonAzureConstruct, appConfigId: Input<string>, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
64
+ /**
65
+ * @summary Method to grant a role assignment to storage account
66
+ * @param id scoped id of the resource
67
+ * @param scope scope in which this resource is defined
68
+ * @param accountId the storage account id
69
+ * @param principalId the principal id to which the role is assigned to
70
+ * @param roleDefinitionId the role definition id
71
+ * @param resourceOptions Optional settings to control resource behaviour
72
+ */
73
+ grantRoleAssignmentToStorageAccount(id: string, scope: CommonAzureConstruct, accountId: Input<string>, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
74
+ /**
75
+ * @summary Method to grant a role assignment to storage table
76
+ * @param id scoped id of the resource
77
+ * @param scope scope in which this resource is defined
78
+ * @param tableId the storage table id
79
+ * @param principalId the principal id to which the role is assigned to
80
+ * @param roleDefinitionId the role definition id
81
+ * @param resourceOptions Optional settings to control resource behaviour
82
+ */
83
+ grantRoleAssignmentToStorageTable(id: string, scope: CommonAzureConstruct, tableId: Input<string>, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
84
+ }
@@ -0,0 +1,120 @@
1
+ import { RoleAssignment } from '@pulumi/azure-native/authorization/index.js';
2
+ /**
3
+ * @classdesc Provides operations on Azure Authorisation using Pulumi
4
+ * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
5
+ * - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
6
+ * @example
7
+ * ```typescript
8
+ * import { CommonAzureConstruct, CommonAzureStackProps } from '@gradientedge/cdk-utils'
9
+ *
10
+ * class CustomConstruct extends CommonAzureConstruct {
11
+ * constructor(name: string, props: CommonAzureStackProps) {
12
+ * super(name, props)
13
+ * this.props = props
14
+ * this.authorisationManager.createRoleAssignment('MyRoleAssignment', this, props)
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export class AzureAuthorisationManager {
20
+ /**
21
+ * @summary Method to create a new role assignment
22
+ * @param id scoped id of the resource
23
+ * @param scope scope in which this resource is defined
24
+ * @param props Role assignment properties
25
+ * @param resourceOptions Optional settings to control resource behaviour
26
+ * @see [Pulumi Azure Native Role Assignment]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/authorization/roleassignment/}
27
+ */
28
+ createRoleAssignment(id, scope, props, resourceOptions) {
29
+ if (!props)
30
+ throw `Props undefined for ${id}`;
31
+ return new RoleAssignment(`${id}`, props, { parent: scope, ...resourceOptions });
32
+ }
33
+ /**
34
+ * @summary Method to grant a role assignment to key vault
35
+ * @param id scoped id of the resource
36
+ * @param scope scope in which this resource is defined
37
+ * @param vaultName the key vault name
38
+ * @param resourceGroupName the resource group name
39
+ * @param principalId the principal id to which the role is assigned to
40
+ * @param roleDefinitionId the role definition id
41
+ * @param resourceOptions Optional settings to control resource behaviour
42
+ */
43
+ grantRoleAssignmentToKeyVault(id, scope, vaultName, resourceGroupName, principalId, roleDefinitionId, resourceOptions) {
44
+ const keyVault = scope.keyVaultManager.resolveKeyVault(scope, vaultName, resourceGroupName, resourceOptions);
45
+ return this.createRoleAssignment(`${id}-kv-role-${vaultName}`, scope, {
46
+ principalId,
47
+ roleDefinitionId,
48
+ scope: keyVault.id,
49
+ }, resourceOptions);
50
+ }
51
+ /**
52
+ * @summary Method to grant a role assignment to event grid topic
53
+ * @param id scoped id of the resource
54
+ * @param scope scope in which this resource is defined
55
+ * @param topicName the topic name
56
+ * @param resourceGroupName the resource group name
57
+ * @param principalId the principal id to which the role is assigned to
58
+ * @param roleDefinitionId the role definition id
59
+ * @param resourceOptions Optional settings to control resource behaviour
60
+ */
61
+ grantRoleAssignmentToEventgridTopic(id, scope, topicName, resourceGroupName, principalId, roleDefinitionId, resourceOptions) {
62
+ const topic = scope.eventgridManager.resolveEventgridTopic(`${id}-egt-role-${topicName}`, scope, {
63
+ topicName,
64
+ resourceGroupName,
65
+ }, resourceOptions);
66
+ return this.createRoleAssignment(`${id}-egt-role-${topicName}`, scope, {
67
+ principalId,
68
+ roleDefinitionId,
69
+ scope: topic.id,
70
+ }, resourceOptions);
71
+ }
72
+ /**
73
+ * @summary Method to grant a role assignment to application configuration
74
+ * @param id scoped id of the resource
75
+ * @param scope scope in which this resource is defined
76
+ * @param appConfigId the application configuration id
77
+ * @param principalId the principal id to which the role is assigned to
78
+ * @param roleDefinitionId the role definition id
79
+ * @param resourceOptions Optional settings to control resource behaviour
80
+ */
81
+ grantRoleAssignmentToApplicationConfiguration(id, scope, appConfigId, principalId, roleDefinitionId, resourceOptions) {
82
+ return this.createRoleAssignment(`${id}-ac-role`, scope, {
83
+ principalId,
84
+ roleDefinitionId,
85
+ scope: appConfigId,
86
+ }, resourceOptions);
87
+ }
88
+ /**
89
+ * @summary Method to grant a role assignment to storage account
90
+ * @param id scoped id of the resource
91
+ * @param scope scope in which this resource is defined
92
+ * @param accountId the storage account id
93
+ * @param principalId the principal id to which the role is assigned to
94
+ * @param roleDefinitionId the role definition id
95
+ * @param resourceOptions Optional settings to control resource behaviour
96
+ */
97
+ grantRoleAssignmentToStorageAccount(id, scope, accountId, principalId, roleDefinitionId, resourceOptions) {
98
+ return this.createRoleAssignment(`${id}-sa-role`, scope, {
99
+ principalId,
100
+ roleDefinitionId,
101
+ scope: accountId,
102
+ }, resourceOptions);
103
+ }
104
+ /**
105
+ * @summary Method to grant a role assignment to storage table
106
+ * @param id scoped id of the resource
107
+ * @param scope scope in which this resource is defined
108
+ * @param tableId the storage table id
109
+ * @param principalId the principal id to which the role is assigned to
110
+ * @param roleDefinitionId the role definition id
111
+ * @param resourceOptions Optional settings to control resource behaviour
112
+ */
113
+ grantRoleAssignmentToStorageTable(id, scope, tableId, principalId, roleDefinitionId, resourceOptions) {
114
+ return this.createRoleAssignment(`${id}-st-role`, scope, {
115
+ principalId,
116
+ roleDefinitionId,
117
+ scope: tableId,
118
+ }, resourceOptions);
119
+ }
120
+ }
@@ -0,0 +1,3 @@
1
+ import { RoleAssignmentArgs } from '@pulumi/azure-native/authorization/index.js';
2
+ export interface RoleAssignmentProps extends RoleAssignmentArgs {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare enum CosmosRoleDefinition {
2
+ CONTRIBUTOR = "CONTRIBUTOR",
3
+ READER = "READER"
4
+ }
5
+ export declare enum CosmosRoleDefinitionId {
6
+ CONTRIBUTOR = "00000000-0000-0000-0000-000000000001",
7
+ READER = "00000000-0000-0000-0000-000000000002"
8
+ }
@@ -0,0 +1,10 @@
1
+ export var CosmosRoleDefinition;
2
+ (function (CosmosRoleDefinition) {
3
+ CosmosRoleDefinition["CONTRIBUTOR"] = "CONTRIBUTOR";
4
+ CosmosRoleDefinition["READER"] = "READER";
5
+ })(CosmosRoleDefinition || (CosmosRoleDefinition = {}));
6
+ export var CosmosRoleDefinitionId;
7
+ (function (CosmosRoleDefinitionId) {
8
+ CosmosRoleDefinitionId["CONTRIBUTOR"] = "00000000-0000-0000-0000-000000000001";
9
+ CosmosRoleDefinitionId["READER"] = "00000000-0000-0000-0000-000000000002";
10
+ })(CosmosRoleDefinitionId || (CosmosRoleDefinitionId = {}));
@@ -1,2 +1,3 @@
1
+ export * from './constants.js';
1
2
  export * from './main.js';
2
3
  export * from './types.js';
@@ -1,2 +1,3 @@
1
+ export * from './constants.js';
1
2
  export * from './main.js';
2
3
  export * from './types.js';
@@ -1,5 +1,7 @@
1
+ import { Input, ResourceOptions } from '@pulumi/pulumi';
1
2
  import { CommonAzureConstruct } from '../../common/index.js';
2
- import { CosmosdbAccountProps, CosmosdbSqlContainerProps, CosmosdbSqlDatabaseProps } from './types.js';
3
+ import { CosmosRoleDefinition } from './constants.js';
4
+ import { CosmosdbAccountProps, CosmosdbSqlContainerProps, CosmosdbSqlDatabaseProps, SqlResourceSqlRoleAssignmentProps } from './types.js';
3
5
  /**
4
6
  * @classdesc Provides operations on Azure CosmosDB using Pulumi
5
7
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
@@ -23,23 +25,63 @@ export declare class AzureCosmosDbManager {
23
25
  * @param id scoped id of the resource
24
26
  * @param scope scope in which this resource is defined
25
27
  * @param props cosmosdb account properties
26
- * @see [Pulumi Azure Native CosmosDB Account]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/databaseaccount/}
28
+ * @param resourceOptions Optional settings to control resource behaviour
29
+ * @see [Pulumi Azure Native CosmosDB Database Account]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/databaseaccount/}
27
30
  */
28
- createCosmosDbAccount(id: string, scope: CommonAzureConstruct, props: CosmosdbAccountProps): import("@pulumi/azure-native/cosmosdb/databaseAccount.js").DatabaseAccount;
31
+ createCosmosDbAccount(id: string, scope: CommonAzureConstruct, props: CosmosdbAccountProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/cosmosdb/databaseAccount.js").DatabaseAccount;
29
32
  /**
30
33
  * @summary Method to create a new cosmosdb database
31
34
  * @param id scoped id of the resource
32
35
  * @param scope scope in which this resource is defined
33
36
  * @param props cosmosdb database properties
37
+ * @param resourceOptions Optional settings to control resource behaviour
34
38
  * @see [Pulumi Azure Native CosmosDB SQL Database]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqldatabase/}
35
39
  */
36
- createCosmosDbDatabase(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlDatabaseProps): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlDatabase.js").SqlResourceSqlDatabase;
40
+ createCosmosDbDatabase(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlDatabaseProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlDatabase.js").SqlResourceSqlDatabase;
37
41
  /**
38
42
  * @summary Method to create a new cosmosdb container
39
43
  * @param id scoped id of the resource
40
44
  * @param scope scope in which this resource is defined
41
45
  * @param props cosmosdb container properties
46
+ * @param resourceOptions Optional settings to control resource behaviour
42
47
  * @see [Pulumi Azure Native CosmosDB SQL Container]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqlcontainer/}
43
48
  */
44
- createCosmosDbContainer(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlContainerProps): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlContainer.js").SqlResourceSqlContainer;
49
+ createCosmosDbContainer(id: string, scope: CommonAzureConstruct, props: CosmosdbSqlContainerProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlContainer.js").SqlResourceSqlContainer;
50
+ /**
51
+ * @summary Method to create a sql role assignment
52
+ * @param id scoped id of the resource
53
+ * @param scope scope in which this resource is defined
54
+ * @param props sql role assignment properties
55
+ * @param resourceOptions Optional settings to control resource behaviour
56
+ * @see [Pulumi Azure Native CosmosDB SQL Role Assignment]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqlroleassignment/}
57
+ */
58
+ createSqlResourceSqlRoleAssignment(id: string, scope: CommonAzureConstruct, props: SqlResourceSqlRoleAssignmentProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/cosmosdb/sqlResourceSqlRoleAssignment.js").SqlResourceSqlRoleAssignment;
59
+ /**
60
+ * @summary Method to resolve an existing cosmosdb account
61
+ * @param scope scope in which this resource is defined
62
+ * @param accountName the account name
63
+ * @param resourceGroupName the resource group name
64
+ * @param resourceOptions Optional settings to control resource behaviour
65
+ */
66
+ resolveCosmosDbAccount(scope: CommonAzureConstruct, accountName: string, resourceGroupName: string, resourceOptions?: ResourceOptions): import("@pulumi/pulumi").Output<import("@pulumi/azure-native/cosmosdb/getDatabaseAccount.js").GetDatabaseAccountResult>;
67
+ /**
68
+ * @summary Method to resolve an existing sql role definition
69
+ * @param scope scope in which this resource is defined
70
+ * @param accountName the account name
71
+ * @param resourceGroupName the resource group name
72
+ * @param roleDefinitionId the role definition id
73
+ * @param resourceOptions Optional settings to control resource behaviour
74
+ */
75
+ resolveSqlRoleDefinition(scope: CommonAzureConstruct, accountName: Input<string>, resourceGroupName: string, roleDefinitionId: string, resourceOptions?: ResourceOptions): import("@pulumi/pulumi").Output<import("@pulumi/azure-native/cosmosdb/getSqlResourceSqlRoleDefinition.js").GetSqlResourceSqlRoleDefinitionResult>;
76
+ /**
77
+ * @summary Method to assign a sql role assignment
78
+ * @param id scoped id of the resource
79
+ * @param scope scope in which this resource is defined
80
+ * @param accountName the account name
81
+ * @param resourceGroupName the resource group name
82
+ * @param principalId the principal id to which the role is assigned to
83
+ * @param roleDefinitions list of role definitions to
84
+ * @param resourceOptions Optional settings to control resource behaviour
85
+ */
86
+ grantSqlRoleDefinitionToAccount(id: string, scope: CommonAzureConstruct, accountName: string, resourceGroupName: string, principalId: Input<string>, roleDefinitions: CosmosRoleDefinition[], resourceOptions?: ResourceOptions): void;
45
87
  }
@@ -1,4 +1,5 @@
1
- import { DatabaseAccount, ResourceIdentityType, SqlResourceSqlContainer, SqlResourceSqlDatabase, } from '@pulumi/azure-native/cosmosdb/index.js';
1
+ import { DatabaseAccount, getDatabaseAccountOutput, getSqlResourceSqlRoleDefinitionOutput, ResourceIdentityType, SqlResourceSqlContainer, SqlResourceSqlDatabase, SqlResourceSqlRoleAssignment, } from '@pulumi/azure-native/cosmosdb/index.js';
2
+ import { CosmosRoleDefinition, CosmosRoleDefinitionId } from './constants.js';
2
3
  /**
3
4
  * @classdesc Provides operations on Azure CosmosDB using Pulumi
4
5
  * - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
@@ -22,9 +23,10 @@ export class AzureCosmosDbManager {
22
23
  * @param id scoped id of the resource
23
24
  * @param scope scope in which this resource is defined
24
25
  * @param props cosmosdb account properties
25
- * @see [Pulumi Azure Native CosmosDB Account]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/databaseaccount/}
26
+ * @param resourceOptions Optional settings to control resource behaviour
27
+ * @see [Pulumi Azure Native CosmosDB Database Account]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/databaseaccount/}
26
28
  */
27
- createCosmosDbAccount(id, scope, props) {
29
+ createCosmosDbAccount(id, scope, props, resourceOptions) {
28
30
  if (!props)
29
31
  throw `Props undefined for ${id}`;
30
32
  // Get resource group name
@@ -44,16 +46,17 @@ export class AzureCosmosDbManager {
44
46
  identity: props.identity ?? {
45
47
  type: ResourceIdentityType.SystemAssigned,
46
48
  },
47
- }, { parent: scope });
49
+ }, { parent: scope, ...resourceOptions });
48
50
  }
49
51
  /**
50
52
  * @summary Method to create a new cosmosdb database
51
53
  * @param id scoped id of the resource
52
54
  * @param scope scope in which this resource is defined
53
55
  * @param props cosmosdb database properties
56
+ * @param resourceOptions Optional settings to control resource behaviour
54
57
  * @see [Pulumi Azure Native CosmosDB SQL Database]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqldatabase/}
55
58
  */
56
- createCosmosDbDatabase(id, scope, props) {
59
+ createCosmosDbDatabase(id, scope, props, resourceOptions) {
57
60
  if (!props)
58
61
  throw `Props undefined for ${id}`;
59
62
  // Get resource group name
@@ -66,16 +69,17 @@ export class AzureCosmosDbManager {
66
69
  ...props,
67
70
  databaseName: scope.resourceNameFormatter.format(props.databaseName?.toString(), scope.props.resourceNameOptions?.cosmosDbSqlDatabase),
68
71
  resourceGroupName: resourceGroupName,
69
- }, { parent: scope });
72
+ }, { parent: scope, ...resourceOptions });
70
73
  }
71
74
  /**
72
75
  * @summary Method to create a new cosmosdb container
73
76
  * @param id scoped id of the resource
74
77
  * @param scope scope in which this resource is defined
75
78
  * @param props cosmosdb container properties
79
+ * @param resourceOptions Optional settings to control resource behaviour
76
80
  * @see [Pulumi Azure Native CosmosDB SQL Container]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqlcontainer/}
77
81
  */
78
- createCosmosDbContainer(id, scope, props) {
82
+ createCosmosDbContainer(id, scope, props, resourceOptions) {
79
83
  if (!props)
80
84
  throw `Props undefined for ${id}`;
81
85
  // Get resource group name
@@ -88,6 +92,71 @@ export class AzureCosmosDbManager {
88
92
  ...props,
89
93
  containerName: scope.resourceNameFormatter.format(props.containerName?.toString(), scope.props.resourceNameOptions?.cosmosDbSqlContainer),
90
94
  resourceGroupName: resourceGroupName,
91
- }, { parent: scope });
95
+ }, { parent: scope, ...resourceOptions });
96
+ }
97
+ /**
98
+ * @summary Method to create a sql role assignment
99
+ * @param id scoped id of the resource
100
+ * @param scope scope in which this resource is defined
101
+ * @param props sql role assignment properties
102
+ * @param resourceOptions Optional settings to control resource behaviour
103
+ * @see [Pulumi Azure Native CosmosDB SQL Role Assignment]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/documentdb/sqlresourcesqlroleassignment/}
104
+ */
105
+ createSqlResourceSqlRoleAssignment(id, scope, props, resourceOptions) {
106
+ return new SqlResourceSqlRoleAssignment(`${id}`, props, { parent: scope, ...resourceOptions });
107
+ }
108
+ /**
109
+ * @summary Method to resolve an existing cosmosdb account
110
+ * @param scope scope in which this resource is defined
111
+ * @param accountName the account name
112
+ * @param resourceGroupName the resource group name
113
+ * @param resourceOptions Optional settings to control resource behaviour
114
+ */
115
+ resolveCosmosDbAccount(scope, accountName, resourceGroupName, resourceOptions) {
116
+ return getDatabaseAccountOutput({ accountName, resourceGroupName }, { parent: scope, ...resourceOptions });
117
+ }
118
+ /**
119
+ * @summary Method to resolve an existing sql role definition
120
+ * @param scope scope in which this resource is defined
121
+ * @param accountName the account name
122
+ * @param resourceGroupName the resource group name
123
+ * @param roleDefinitionId the role definition id
124
+ * @param resourceOptions Optional settings to control resource behaviour
125
+ */
126
+ resolveSqlRoleDefinition(scope, accountName, resourceGroupName, roleDefinitionId, resourceOptions) {
127
+ return getSqlResourceSqlRoleDefinitionOutput({ accountName, resourceGroupName, roleDefinitionId }, { parent: scope, ...resourceOptions });
128
+ }
129
+ /**
130
+ * @summary Method to assign a sql role assignment
131
+ * @param id scoped id of the resource
132
+ * @param scope scope in which this resource is defined
133
+ * @param accountName the account name
134
+ * @param resourceGroupName the resource group name
135
+ * @param principalId the principal id to which the role is assigned to
136
+ * @param roleDefinitions list of role definitions to
137
+ * @param resourceOptions Optional settings to control resource behaviour
138
+ */
139
+ grantSqlRoleDefinitionToAccount(id, scope, accountName, resourceGroupName, principalId, roleDefinitions, resourceOptions) {
140
+ const cosmosDbAccount = this.resolveCosmosDbAccount(scope, accountName, resourceGroupName, resourceOptions);
141
+ if (roleDefinitions.includes(CosmosRoleDefinition.CONTRIBUTOR)) {
142
+ const cosmosdbSqlRoleDefinitionContributor = this.resolveSqlRoleDefinition(scope, cosmosDbAccount.name, resourceGroupName, CosmosRoleDefinitionId.CONTRIBUTOR, resourceOptions);
143
+ this.createSqlResourceSqlRoleAssignment(`${id}-cdb-ra-contributor`, scope, {
144
+ accountName: cosmosDbAccount.name,
145
+ resourceGroupName: resourceGroupName,
146
+ roleDefinitionId: cosmosdbSqlRoleDefinitionContributor.id,
147
+ principalId,
148
+ scope: cosmosDbAccount.id,
149
+ }, resourceOptions);
150
+ }
151
+ if (roleDefinitions.includes(CosmosRoleDefinition.READER)) {
152
+ const cosmosdbSqlRoleDefinitionReader = this.resolveSqlRoleDefinition(scope, cosmosDbAccount.name, resourceGroupName, CosmosRoleDefinitionId.READER, resourceOptions);
153
+ this.createSqlResourceSqlRoleAssignment(`${id}-cdb-ra-reader`, scope, {
154
+ accountName: cosmosDbAccount.name,
155
+ resourceGroupName: resourceGroupName,
156
+ roleDefinitionId: cosmosdbSqlRoleDefinitionReader.id,
157
+ principalId,
158
+ scope: cosmosDbAccount.id,
159
+ }, resourceOptions);
160
+ }
92
161
  }
93
162
  }
@@ -1,7 +1,9 @@
1
- import { DatabaseAccountArgs, SqlResourceSqlContainerArgs, SqlResourceSqlDatabaseArgs } from '@pulumi/azure-native/cosmosdb/index.js';
1
+ import { DatabaseAccountArgs, SqlResourceSqlContainerArgs, SqlResourceSqlDatabaseArgs, SqlResourceSqlRoleAssignmentArgs } from '@pulumi/azure-native/cosmosdb/index.js';
2
2
  export interface CosmosdbAccountProps extends DatabaseAccountArgs {
3
3
  }
4
4
  export interface CosmosdbSqlDatabaseProps extends SqlResourceSqlDatabaseArgs {
5
5
  }
6
6
  export interface CosmosdbSqlContainerProps extends SqlResourceSqlContainerArgs {
7
7
  }
8
+ export interface SqlResourceSqlRoleAssignmentProps extends SqlResourceSqlRoleAssignmentArgs {
9
+ }
@@ -1,3 +1,4 @@
1
+ import { ResourceOptions } from '@pulumi/pulumi';
1
2
  import { CommonAzureConstruct } from '../../common/index.js';
2
3
  import { DnsARecordProps, DnsCnameRecordProps, DnsTxtRecordProps, DnsZoneProps } from './types.js';
3
4
  /**
@@ -23,31 +24,35 @@ export declare class AzureDnsManager {
23
24
  * @param id scoped id of the resource
24
25
  * @param scope scope in which this resource is defined
25
26
  * @param props dns zone properties
27
+ * @param resourceOptions Optional settings to control resource behaviour
26
28
  * @see [Pulumi Azure Native DNS Zone]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/zone/}
27
29
  */
28
- createDnsZone(id: string, scope: CommonAzureConstruct, props: DnsZoneProps): import("@pulumi/azure-native/dns/zone.js").Zone;
30
+ createDnsZone(id: string, scope: CommonAzureConstruct, props: DnsZoneProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/dns/zone.js").Zone;
29
31
  /**
30
32
  * @summary Method to create a new DNS A Record
31
33
  * @param id scoped id of the resource
32
34
  * @param scope scope in which this resource is defined
33
35
  * @param props dns a record properties
36
+ * @param resourceOptions Optional settings to control resource behaviour
34
37
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
35
38
  */
36
- createDnsARecord(id: string, scope: CommonAzureConstruct, props: DnsARecordProps): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
39
+ createDnsARecord(id: string, scope: CommonAzureConstruct, props: DnsARecordProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
37
40
  /**
38
41
  * @summary Method to create a new DNS CNAME Record
39
42
  * @param id scoped id of the resource
40
43
  * @param scope scope in which this resource is defined
41
44
  * @param props dns cname record properties
45
+ * @param resourceOptions Optional settings to control resource behaviour
42
46
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
43
47
  */
44
- createDnsCnameRecord(id: string, scope: CommonAzureConstruct, props: DnsCnameRecordProps): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
48
+ createDnsCnameRecord(id: string, scope: CommonAzureConstruct, props: DnsCnameRecordProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
45
49
  /**
46
50
  * @summary Method to create a new DNS TXT Record
47
51
  * @param id scoped id of the resource
48
52
  * @param scope scope in which this resource is defined
49
53
  * @param props dns txt record properties
54
+ * @param resourceOptions Optional settings to control resource behaviour
50
55
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
51
56
  */
52
- createDnsTxtRecord(id: string, scope: CommonAzureConstruct, props: DnsTxtRecordProps): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
57
+ createDnsTxtRecord(id: string, scope: CommonAzureConstruct, props: DnsTxtRecordProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/dns/recordSet.js").RecordSet;
53
58
  }
@@ -22,9 +22,10 @@ export class AzureDnsManager {
22
22
  * @param id scoped id of the resource
23
23
  * @param scope scope in which this resource is defined
24
24
  * @param props dns zone properties
25
+ * @param resourceOptions Optional settings to control resource behaviour
25
26
  * @see [Pulumi Azure Native DNS Zone]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/zone/}
26
27
  */
27
- createDnsZone(id, scope, props) {
28
+ createDnsZone(id, scope, props, resourceOptions) {
28
29
  if (!props)
29
30
  throw `Props undefined for ${id}`;
30
31
  // Get resource group name
@@ -41,16 +42,17 @@ export class AzureDnsManager {
41
42
  tags: props.tags ?? {
42
43
  environment: scope.props.stage,
43
44
  },
44
- }, { parent: scope });
45
+ }, { parent: scope, ...resourceOptions });
45
46
  }
46
47
  /**
47
48
  * @summary Method to create a new DNS A Record
48
49
  * @param id scoped id of the resource
49
50
  * @param scope scope in which this resource is defined
50
51
  * @param props dns a record properties
52
+ * @param resourceOptions Optional settings to control resource behaviour
51
53
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
52
54
  */
53
- createDnsARecord(id, scope, props) {
55
+ createDnsARecord(id, scope, props, resourceOptions) {
54
56
  if (!props)
55
57
  throw `Props undefined for ${id}`;
56
58
  return new RecordSet(`${id}-da`, {
@@ -60,16 +62,17 @@ export class AzureDnsManager {
60
62
  metadata: props.metadata ?? {
61
63
  environment: scope.props.stage,
62
64
  },
63
- }, { parent: scope });
65
+ }, { parent: scope, ...resourceOptions });
64
66
  }
65
67
  /**
66
68
  * @summary Method to create a new DNS CNAME Record
67
69
  * @param id scoped id of the resource
68
70
  * @param scope scope in which this resource is defined
69
71
  * @param props dns cname record properties
72
+ * @param resourceOptions Optional settings to control resource behaviour
70
73
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
71
74
  */
72
- createDnsCnameRecord(id, scope, props) {
75
+ createDnsCnameRecord(id, scope, props, resourceOptions) {
73
76
  if (!props)
74
77
  throw `Props undefined for ${id}`;
75
78
  return new RecordSet(`${id}-dc`, {
@@ -79,16 +82,17 @@ export class AzureDnsManager {
79
82
  metadata: props.metadata ?? {
80
83
  environment: scope.props.stage,
81
84
  },
82
- }, { parent: scope });
85
+ }, { parent: scope, ...resourceOptions });
83
86
  }
84
87
  /**
85
88
  * @summary Method to create a new DNS TXT Record
86
89
  * @param id scoped id of the resource
87
90
  * @param scope scope in which this resource is defined
88
91
  * @param props dns txt record properties
92
+ * @param resourceOptions Optional settings to control resource behaviour
89
93
  * @see [Pulumi Azure Native DNS Record Set]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/network/recordset/}
90
94
  */
91
- createDnsTxtRecord(id, scope, props) {
95
+ createDnsTxtRecord(id, scope, props, resourceOptions) {
92
96
  if (!props)
93
97
  throw `Props undefined for ${id}`;
94
98
  return new RecordSet(`${id}-dt`, {
@@ -98,6 +102,6 @@ export class AzureDnsManager {
98
102
  metadata: props.metadata ?? {
99
103
  environment: scope.props.stage,
100
104
  },
101
- }, { parent: scope });
105
+ }, { parent: scope, ...resourceOptions });
102
106
  }
103
107
  }