@drunk-pulumi/azure 1.0.23 → 1.0.24

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 (62) hide show
  1. package/Builder/AcrBuilder.d.ts +5 -0
  2. package/Builder/AcrBuilder.js +43 -10
  3. package/Builder/AksBuilder.d.ts +5 -0
  4. package/Builder/AksBuilder.js +90 -6
  5. package/Builder/ApimApiBuilder.js +1 -1
  6. package/Builder/ApimBuilder.js +3 -7
  7. package/Builder/ApimPolicyBuilder.js +1 -1
  8. package/Builder/ApimProductBuilder.d.ts +6 -5
  9. package/Builder/ApimProductBuilder.js +53 -27
  10. package/Builder/AppConfigBuilder.js +4 -8
  11. package/Builder/MySqlBuilder.js +4 -8
  12. package/Builder/PostgreSqlBuilder.js +4 -8
  13. package/Builder/RedisCacheBuilder.js +4 -11
  14. package/Builder/ResourceBuilder.js +4 -4
  15. package/Builder/ServiceBusBuilder.js +4 -11
  16. package/Builder/SignalRBuilder.js +4 -11
  17. package/Builder/VaultBuilder.js +7 -26
  18. package/Builder/types/acrBuilder.d.ts +38 -2
  19. package/Builder/types/apimBuilder.d.ts +109 -5
  20. package/Builder/types/apimPolicyBuilder.d.ts +129 -7
  21. package/Builder/types/apimPolicyBuilder.js +4 -1
  22. package/Builder/types/apimProductBuilder.d.ts +152 -5
  23. package/Builder/types/appCertBuilder.d.ts +17 -0
  24. package/Builder/types/appConfigBuilder.d.ts +22 -0
  25. package/Builder/types/askBuilder.d.ts +79 -1
  26. package/Builder/types/automationBuilder.d.ts +17 -0
  27. package/Builder/types/cdnBuilder.d.ts +11 -0
  28. package/Builder/types/dnsZoneBuilder.d.ts +20 -0
  29. package/Builder/types/envRoleBuilder.d.ts +28 -0
  30. package/Builder/types/genericBuilder.d.ts +78 -0
  31. package/Builder/types/genericBuilder.js +9 -1
  32. package/Builder/types/iotHubBuilder.d.ts +38 -5
  33. package/Builder/types/logicAppBuilder.d.ts +17 -0
  34. package/Builder/types/mySqlBuilder.d.ts +54 -1
  35. package/Builder/types/posgreSqlBuilder.d.ts +64 -2
  36. package/Builder/types/privateDnsZoneBuilder.d.ts +26 -0
  37. package/Builder/types/redisCacheBuilder.d.ts +31 -0
  38. package/Builder/types/resourceBuilder.d.ts +171 -7
  39. package/Builder/types/serviceBusBuilder.d.ts +55 -0
  40. package/Builder/types/signalRBuilder.d.ts +65 -6
  41. package/Builder/types/sqlBuilder.d.ts +88 -1
  42. package/Builder/types/storageBuilder.d.ts +63 -0
  43. package/Builder/types/vaultBuilder.d.ts +43 -1
  44. package/Builder/types/vdiBuilder.d.ts +41 -2
  45. package/Builder/types/vmBuilder.d.ts +83 -1
  46. package/Builder/types/vnetBuilder.d.ts +107 -0
  47. package/KeyVault/index.d.ts +1 -11
  48. package/KeyVault/index.js +3 -21
  49. package/Sql/index.js +3 -6
  50. package/Storage/index.js +4 -8
  51. package/VNet/PrivateEndpoint.d.ts +9 -3
  52. package/VNet/PrivateEndpoint.js +62 -2
  53. package/VNet/index.d.ts +11 -0
  54. package/VNet/index.js +18 -2
  55. package/package.json +1 -1
  56. package/types.d.ts +162 -4
  57. package/Sql/Auditing.d.ts +0 -0
  58. package/Sql/Auditing.js +0 -2
  59. package/Sql/Helper.d.ts +0 -9
  60. package/Sql/Helper.js +0 -11
  61. package/VNet/GlobalNetworkPeering.d.ts +0 -9
  62. package/VNet/GlobalNetworkPeering.js +0 -40
@@ -5,54 +5,218 @@ import { BuilderProps, IBuilder, IBuilderAsync, IEncryptable, ILockable } from '
5
5
  import { CertBuilderType, VaultBuilderSecretType } from './vaultBuilder';
6
6
  import { IVnetBuilder, IVnetBuilderStart, VnetBuilderResults } from './vnetBuilder';
7
7
  import { Input } from '@pulumi/pulumi';
8
+ /**
9
+ * Type for the results of the resource builder.
10
+ */
8
11
  export type ResourceBuilderResults = BuilderProps & WithEncryptionInfo & WithLogInfo & {
9
12
  vnetInstance?: VnetBuilderResults;
10
13
  otherInstances: Record<string, any>;
11
14
  };
12
- export type BuilderFunctionType = (props: ResourceBuilderResults) => IBuilder<any>;
13
- export type BuilderAsyncFunctionType = (props: ResourceBuilderResults) => IBuilderAsync<any>;
14
- export type ResourceVnetBuilderType = (builder: IVnetBuilderStart) => IVnetBuilder;
15
- export type ResourceFunction = (props: BuilderProps) => ResourceInfo;
15
+ /**
16
+ * Type for a synchronous builder function.
17
+ */
18
+ export type BuilderFunctionType = (
19
+ /**
20
+ * The properties of the resource builder results.
21
+ */
22
+ props: ResourceBuilderResults) => IBuilder<any>;
23
+ /**
24
+ * Type for an asynchronous builder function.
25
+ */
26
+ export type BuilderAsyncFunctionType = (
27
+ /**
28
+ * The properties of the resource builder results.
29
+ */
30
+ props: ResourceBuilderResults) => IBuilderAsync<any>;
31
+ /**
32
+ * Type for a VNet builder function.
33
+ */
34
+ export type ResourceVnetBuilderType = (
35
+ /**
36
+ * The starting point for the VNet builder.
37
+ */
38
+ builder: IVnetBuilderStart) => IVnetBuilder;
39
+ /**
40
+ * Type for a resource function.
41
+ */
42
+ export type ResourceFunction = (
43
+ /**
44
+ * The properties of the builder.
45
+ */
46
+ props: BuilderProps) => ResourceInfo;
47
+ /**
48
+ * Type for linking a resource vault.
49
+ */
16
50
  export type ResourceVaultLinkingBuilderType = {
51
+ /**
52
+ * List of subnet names to link to the resource vault.
53
+ */
17
54
  subnetNames?: string[];
55
+ /**
56
+ * List of IP addresses to link to the resource vault.
57
+ */
18
58
  ipAddresses?: Input<string>[];
59
+ /**
60
+ * Whether to link the resource vault as a private link.
61
+ */
19
62
  asPrivateLink?: boolean;
20
63
  };
64
+ /**
65
+ * Interface for building resource roles.
66
+ */
21
67
  export interface IResourceRoleBuilder {
68
+ /**
69
+ * Creates roles for the resource.
70
+ * @returns An instance of IResourceGroupBuilder.
71
+ */
22
72
  createRoles(): IResourceGroupBuilder;
73
+ /**
74
+ * Sets the roles properties for the resource.
75
+ * @param props - The roles properties.
76
+ * @returns An instance of IResourceGroupBuilder.
77
+ */
23
78
  withRoles(props: EnvRolesInfo): IResourceGroupBuilder;
79
+ /**
80
+ * Sets the roles properties from the vault.
81
+ * @returns An instance of IResourceGroupBuilder.
82
+ */
24
83
  withRolesFromVault(): IResourceGroupBuilder;
25
84
  }
85
+ /**
86
+ * Interface for building resource groups.
87
+ */
26
88
  export interface IResourceGroupBuilder {
89
+ /**
90
+ * Creates a resource group.
91
+ * @param props - The role enable types.
92
+ * @returns An instance of IResourceVaultBuilder.
93
+ */
27
94
  createRG(props?: RoleEnableTypes): IResourceVaultBuilder;
95
+ /**
96
+ * Sets the resource group properties.
97
+ * @param props - The resource group properties.
98
+ * @returns An instance of IResourceVaultBuilder.
99
+ */
28
100
  withRG(props: ResourceGroupInfo): IResourceVaultBuilder;
29
101
  }
30
- /** Key Vault is compulsory for resource builder*/
102
+ /**
103
+ * Interface for building resource vaults.
104
+ * Key Vault is compulsory for resource builder.
105
+ */
31
106
  export interface IResourceVaultBuilder {
107
+ /**
108
+ * Creates a vault for the resource.
109
+ * @param name - The name of the vault.
110
+ * @returns An instance of IResourceBuilder.
111
+ */
32
112
  createVault(name?: string): IResourceBuilder;
113
+ /**
114
+ * Sets the vault properties.
115
+ * @param props - The vault properties.
116
+ * @returns An instance of IResourceBuilder.
117
+ */
33
118
  withVault(props: KeyVaultInfo): IResourceBuilder;
119
+ /**
120
+ * Sets the vault properties from the given name.
121
+ * @param name - The name of the vault.
122
+ * @returns An instance of IResourceBuilder.
123
+ */
34
124
  withVaultFrom(name: string): IResourceBuilder;
35
125
  }
126
+ /**
127
+ * Interface for building resource vault items.
128
+ */
36
129
  export interface IResourceVaultItemsBuilder {
130
+ /**
131
+ * Adds secrets to the resource vault.
132
+ * @param items - The secrets to add.
133
+ * @returns An instance of IResourceBuilder.
134
+ */
37
135
  addSecrets(items: VaultBuilderSecretType): IResourceBuilder;
136
+ /**
137
+ * Adds certificates to the resource vault.
138
+ * @param props - The certificate properties.
139
+ * @returns An instance of IResourceBuilder.
140
+ */
38
141
  addCerts(props: CertBuilderType): IResourceBuilder;
39
142
  }
143
+ /**
144
+ * Interface for building environment user-assigned identities.
145
+ */
40
146
  export interface IEnvUserAssignedIdentityBuilder {
41
- /** Create User Assigned Identity for encryption purposes*/
147
+ /**
148
+ * Creates a User Assigned Identity for encryption purposes.
149
+ * @returns An instance of IResourceBuilder.
150
+ */
42
151
  createEnvUID(): IResourceBuilder;
43
- /** Create User Assigned Identity for encryption purposes*/
152
+ /**
153
+ * Sets the User Assigned Identity properties from the vault.
154
+ * @returns An instance of IResourceBuilder.
155
+ */
44
156
  withEnvUIDFromVault(): IResourceBuilder;
45
157
  }
158
+ /**
159
+ * Interface for building resource VNets.
160
+ */
46
161
  export interface IResourceVnetBuilder {
162
+ /**
163
+ * Sets the VNet properties for the resource.
164
+ * @param props - The VNet builder properties.
165
+ * @returns An instance of IResourceBuilder.
166
+ */
47
167
  withVnet(props: ResourceVnetBuilderType): IResourceBuilder;
168
+ /**
169
+ * Links the resource vault to the specified properties.
170
+ * @param props - The vault linking properties.
171
+ * @returns An instance of IResourceBuilder.
172
+ */
48
173
  linkVaultTo(props: ResourceVaultLinkingBuilderType): IResourceBuilder;
49
174
  }
175
+ /**
176
+ * Interface for building resources.
177
+ */
50
178
  export interface IResourceBuilder extends IResourceVnetBuilder, IEnvUserAssignedIdentityBuilder, IResourceVaultItemsBuilder, ILockable<IResourceBuilder>, IEncryptable<IResourceBuilder> {
179
+ /**
180
+ * Sets the log properties from the given name.
181
+ * @param name - The name of the log.
182
+ * @returns An instance of IResourceBuilder.
183
+ */
51
184
  withLogFrom(name: string): IResourceBuilder;
185
+ /**
186
+ * Sets the builder properties.
187
+ * @param props - The builder function properties.
188
+ * @returns An instance of IResourceBuilder.
189
+ */
52
190
  withBuilder(props: BuilderFunctionType): IResourceBuilder;
191
+ /**
192
+ * Conditionally sets the builder properties.
193
+ * @param condition - The condition to check.
194
+ * @param props - The builder function properties.
195
+ * @returns An instance of IResourceBuilder.
196
+ */
53
197
  withBuilderIf(condition: boolean, props: BuilderFunctionType): IResourceBuilder;
198
+ /**
199
+ * Sets the asynchronous builder properties.
200
+ * @param props - The asynchronous builder function properties.
201
+ * @returns An instance of IResourceBuilder.
202
+ */
54
203
  withBuilderAsync(props: BuilderAsyncFunctionType): IResourceBuilder;
204
+ /**
205
+ * Conditionally sets the asynchronous builder properties.
206
+ * @param condition - The condition to check.
207
+ * @param props - The asynchronous builder function properties.
208
+ * @returns An instance of IResourceBuilder.
209
+ */
55
210
  withBuilderAsyncIf(condition: boolean, props: BuilderAsyncFunctionType): IResourceBuilder;
211
+ /**
212
+ * Sets the resource properties.
213
+ * @param builder - The resource function.
214
+ * @returns An instance of IResourceBuilder.
215
+ */
56
216
  withResource(builder: ResourceFunction): IResourceBuilder;
217
+ /**
218
+ * Builds the resource and returns the resource builder results.
219
+ * @returns A promise that resolves to the resource builder results.
220
+ */
57
221
  build(): Promise<ResourceBuilderResults>;
58
222
  }
@@ -1,23 +1,78 @@
1
1
  import { BuilderProps, IBuilder } from './genericBuilder';
2
2
  import { NetworkPropsType, ResourceInfo, WithEncryption, WithEnvRoles } from '../../types';
3
3
  import * as bus from '@pulumi/azure-native/servicebus/v20230101preview';
4
+ /**
5
+ * Arguments required for building a Service Bus resource.
6
+ */
4
7
  export type ServiceBusBuilderArgs = BuilderProps & WithEnvRoles & WithEncryption;
8
+ /**
9
+ * Types of SKU available for Service Bus.
10
+ */
5
11
  export type ServiceBusSkuTypes = bus.SkuTier;
12
+ /**
13
+ * Arguments for defining a Service Bus Queue.
14
+ */
6
15
  export type ServiceBusQueueArgs = Omit<bus.QueueArgs, 'namespaceName' | 'queueName' | 'resourceGroupName' | 'status'>;
16
+ /**
17
+ * Arguments for defining a Service Bus Subscription.
18
+ */
7
19
  export type ServiceBusSubArgs = Omit<bus.SubscriptionArgs, 'namespaceName' | 'topicName' | 'resourceGroupName' | 'status' | 'subscriptionName'> & {
8
20
  rules?: Omit<bus.RuleArgs, 'namespaceName' | 'subscriptionName' | 'topicName' | 'ruleName' | 'resourceGroupName'>;
9
21
  };
22
+ /**
23
+ * Arguments for defining a Service Bus Topic.
24
+ */
10
25
  export type ServiceBusTopicArgs = Omit<bus.TopicArgs, 'namespaceName' | 'topicName' | 'resourceGroupName' | 'status'> & {
11
26
  subscriptions?: Record<string, ServiceBusSubArgs>;
12
27
  };
28
+ /**
29
+ * Options for configuring a Service Bus Namespace.
30
+ */
13
31
  export type ServiceBusOptions = Pick<bus.NamespaceArgs, 'disableLocalAuth'>;
32
+ /**
33
+ * Interface for building the SKU of a Service Bus.
34
+ */
14
35
  export interface IServiceBusSkuBuilder {
36
+ /**
37
+ * Sets the SKU properties for the Service Bus.
38
+ * @param sku - The SKU type.
39
+ * @returns An instance of IServiceBusBuilder.
40
+ */
15
41
  withSku(sku: ServiceBusSkuTypes): IServiceBusBuilder;
16
42
  }
43
+ /**
44
+ * Interface for building a Service Bus.
45
+ */
17
46
  export interface IServiceBusBuilder extends IBuilder<ResourceInfo> {
47
+ /**
48
+ * Sets the network properties for the Service Bus.
49
+ * @param props - The network properties.
50
+ * @returns An instance of IServiceBusBuilder.
51
+ */
18
52
  withNetwork(props: NetworkPropsType): IServiceBusBuilder;
53
+ /**
54
+ * Conditionally sets the network properties for the Service Bus.
55
+ * @param condition - The condition to check.
56
+ * @param props - The network properties.
57
+ * @returns An instance of IServiceBusBuilder.
58
+ */
19
59
  withNetworkIf(condition: boolean, props: NetworkPropsType): IServiceBusBuilder;
60
+ /**
61
+ * Sets additional options for the Service Bus.
62
+ * @param props - The options properties.
63
+ * @returns An instance of IServiceBusBuilder.
64
+ */
20
65
  withOptions(props: ServiceBusOptions): IServiceBusBuilder;
66
+ /**
67
+ * Adds queues to the Service Bus.
68
+ * @param props - The properties of the queues.
69
+ * @returns An instance of IServiceBusBuilder.
70
+ */
21
71
  withQueues(props: Record<string, ServiceBusQueueArgs>): IServiceBusBuilder;
72
+ /**
73
+ * Adds topics to the Service Bus.
74
+ * @param props - The properties of the topics.
75
+ * @returns An instance of IServiceBusBuilder.
76
+ */
22
77
  withTopics(props: Record<string, ServiceBusTopicArgs>): IServiceBusBuilder;
23
78
  }
@@ -2,37 +2,96 @@ import * as ss from '@pulumi/azure-native/signalrservice';
2
2
  import { BuilderProps, IBuilder } from './genericBuilder';
3
3
  import { PrivateLinkPropsType, ResourceInfo, WithEncryptionInfo } from '../../types';
4
4
  import * as pulumi from '@pulumi/pulumi';
5
+ /**
6
+ * Arguments required for building a SignalR resource.
7
+ */
5
8
  export type SignalRBuilderArgs = BuilderProps & WithEncryptionInfo;
9
+ /**
10
+ * Arguments for defining the SKU of a SignalR service.
11
+ */
6
12
  export type SignalRSkuBuilderType = {
13
+ /**
14
+ * The capacity of the SKU.
15
+ */
7
16
  capacity?: 1 | 2 | 5 | 10 | 20 | 50 | 100;
17
+ /**
18
+ * The name of the SKU.
19
+ */
8
20
  name: 'Standard_S1' | 'Free_F1';
21
+ /**
22
+ * The tier of the SKU.
23
+ */
9
24
  tier?: 'Standard' | 'Free';
10
25
  };
26
+ /**
27
+ * Arguments for defining the kind of a SignalR service.
28
+ */
11
29
  export type SignalRKindBuilderType = ss.ServiceKind | string;
30
+ /**
31
+ * Options for configuring a SignalR service.
32
+ */
12
33
  export type SignalROptionsBuilder = {
34
+ /**
35
+ * Whether client certificate authentication is enabled.
36
+ */
13
37
  clientCertEnabled?: pulumi.Input<boolean>;
14
38
  /**
15
- * DisableLocalAuth
16
- * Enable or disable aad auth
17
- * When set as true, connection with AuthType=aad won't work.
39
+ * Enable or disable AAD authentication.
40
+ * When set to true, connection with AuthType=aad won't work.
18
41
  */
19
42
  disableAadAuth?: pulumi.Input<boolean>;
20
43
  /**
21
- * DisableLocalAuth
22
- * Enable or disable local auth with AccessKey
23
- * When set as true, connection with AccessKey=xxx won't work.
44
+ * Enable or disable local authentication with AccessKey.
45
+ * When set to true, connection with AccessKey=xxx won't work.
24
46
  */
25
47
  disableLocalAuth?: pulumi.Input<boolean>;
48
+ /**
49
+ * Whether public network access is enabled.
50
+ */
26
51
  publicNetworkAccess?: pulumi.Input<boolean>;
27
52
  };
53
+ /**
54
+ * Interface for building the kind of a SignalR service.
55
+ */
28
56
  export interface ISignalRKindBuilder {
57
+ /**
58
+ * Sets the kind properties for the SignalR service.
59
+ * @param props - The kind properties.
60
+ * @returns An instance of ISignalRSkuBuilder.
61
+ */
29
62
  withKind(props: SignalRKindBuilderType): ISignalRSkuBuilder;
30
63
  }
64
+ /**
65
+ * Interface for building the SKU of a SignalR service.
66
+ */
31
67
  export interface ISignalRSkuBuilder {
68
+ /**
69
+ * Sets the SKU properties for the SignalR service.
70
+ * @param props - The SKU properties.
71
+ * @returns An instance of ISignalRBuilder.
72
+ */
32
73
  withSku(props: SignalRSkuBuilderType): ISignalRBuilder;
33
74
  }
75
+ /**
76
+ * Interface for building a SignalR service.
77
+ */
34
78
  export interface ISignalRBuilder extends IBuilder<ResourceInfo> {
79
+ /**
80
+ * Sets the allowed origins for the SignalR service.
81
+ * @param props - The allowed origins.
82
+ * @returns An instance of ISignalRBuilder.
83
+ */
35
84
  allowsOrigins(...props: pulumi.Input<string>[]): ISignalRBuilder;
85
+ /**
86
+ * Sets the private link properties for the SignalR service.
87
+ * @param props - The private link properties.
88
+ * @returns An instance of ISignalRBuilder.
89
+ */
36
90
  withPrivateLink(props: PrivateLinkPropsType): ISignalRBuilder;
91
+ /**
92
+ * Sets additional options for the SignalR service.
93
+ * @param props - The options properties.
94
+ * @returns An instance of ISignalRBuilder.
95
+ */
37
96
  withOptions(props: SignalROptionsBuilder): ISignalRBuilder;
38
97
  }
@@ -3,34 +3,121 @@ import { BuilderProps, IBuilder, IIgnoreChanges, ILockable, ILoginBuilder } from
3
3
  import { SqlAuthType, SqlElasticPoolType, SqlNetworkType, SqlResults, SqlVulnerabilityAssessmentType } from '../../Sql';
4
4
  import { SqlDbProps, SqlDbSku } from '../../Sql/SqlDb';
5
5
  import { WithEnvRoles, WithLockable, WithLogInfo } from '../../types';
6
+ /**
7
+ * Arguments required for building a SQL resource.
8
+ */
6
9
  export type SqlBuilderArgs = BuilderProps & WithEnvRoles & WithLogInfo & WithLockable;
10
+ /**
11
+ * Options for SQL authentication, excluding sensitive fields.
12
+ */
7
13
  export type SqlBuilderAuthOptionsType = Omit<SqlAuthType, 'password' | 'adminLogin' | 'envRoles'>;
14
+ /**
15
+ * Arguments for defining a SQL database.
16
+ */
8
17
  export type SqlDbBuilderType = {
18
+ /**
19
+ * The name of the database.
20
+ */
9
21
  name: string;
22
+ /**
23
+ * The SKU of the database.
24
+ */
10
25
  sku?: SqlDbSku;
11
26
  };
27
+ /**
28
+ * Arguments for defining a SQL database from an existing database ID.
29
+ */
12
30
  export type SqlFromDbType = SqlDbBuilderType & {
31
+ /**
32
+ * The ID of the existing database.
33
+ */
13
34
  fromDbId: Input<string>;
14
35
  };
36
+ /**
37
+ * Full properties for a SQL database, excluding certain fields.
38
+ */
15
39
  export type FullSqlDbPropsType = Omit<SqlDbProps, 'dependsOn' | 'importUri' | 'ignoreChanges' | 'group' | 'elasticPoolId' | 'sqlServerName'>;
40
+ /**
41
+ * Vulnerability assessment properties for a SQL database.
42
+ */
16
43
  export type SqlBuilderVulnerabilityAssessmentType = Pick<SqlVulnerabilityAssessmentType, 'alertEmails'>;
44
+ /**
45
+ * Interface for building SQL login credentials.
46
+ */
17
47
  export interface ISqlLoginBuilder extends ILoginBuilder<ISqlAuthBuilder> {
18
48
  }
49
+ /**
50
+ * Interface for building SQL authentication options.
51
+ */
19
52
  export interface ISqlAuthBuilder {
53
+ /**
54
+ * Sets the authentication options for the SQL server.
55
+ * @param props - The authentication options.
56
+ * @returns An instance of ISqlNetworkBuilder.
57
+ */
20
58
  withAuthOptions(props: SqlBuilderAuthOptionsType): ISqlNetworkBuilder;
21
59
  }
60
+ /**
61
+ * Interface for building SQL network properties.
62
+ */
22
63
  export interface ISqlNetworkBuilder {
64
+ /**
65
+ * Sets the network properties for the SQL server.
66
+ * @param props - The network properties.
67
+ * @returns An instance of ISqlTierBuilder.
68
+ */
23
69
  withNetwork(props: SqlNetworkType): ISqlTierBuilder;
24
70
  }
71
+ /**
72
+ * Interface for building SQL tier and elastic pool properties.
73
+ */
25
74
  export interface ISqlTierBuilder {
75
+ /**
76
+ * Sets the elastic pool properties for the SQL server.
77
+ * @param props - The elastic pool properties.
78
+ * @returns An instance of ISqlBuilder.
79
+ */
26
80
  withElasticPool(props: SqlElasticPoolType): ISqlBuilder;
81
+ /**
82
+ * Sets the tier properties for the SQL server.
83
+ * @param sku - The SKU of the database.
84
+ * @returns An instance of ISqlBuilder.
85
+ */
27
86
  withTier(sku: SqlDbSku): ISqlBuilder;
28
87
  }
88
+ /**
89
+ * Interface for building a SQL server.
90
+ */
29
91
  export interface ISqlBuilder extends IBuilder<SqlResults>, ILockable<ISqlBuilder>, IIgnoreChanges<ISqlBuilder> {
92
+ /**
93
+ * Adds databases to the SQL server.
94
+ * @param props - The properties of the databases.
95
+ * @returns An instance of ISqlBuilder.
96
+ */
30
97
  withDatabases(props: SqlDbBuilderType): ISqlBuilder;
98
+ /**
99
+ * Copies an existing database to the SQL server.
100
+ * @param props - The properties of the database to copy.
101
+ * @returns An instance of ISqlBuilder.
102
+ */
31
103
  copyDb(props: SqlFromDbType): ISqlBuilder;
104
+ /**
105
+ * Creates a replica of an existing database on the SQL server.
106
+ * @param props - The properties of the database to replicate.
107
+ * @returns An instance of ISqlBuilder.
108
+ */
32
109
  replicaDb(props: SqlFromDbType): ISqlBuilder;
110
+ /**
111
+ * Sets the vulnerability assessment properties for the SQL server.
112
+ * @param props - The vulnerability assessment properties.
113
+ * @returns An instance of ISqlBuilder.
114
+ */
33
115
  withVulnerabilityAssessment(props: SqlBuilderVulnerabilityAssessmentType): ISqlBuilder;
34
- /** Allows to on/off the Assessment based on environment condition */
116
+ /**
117
+ * Conditionally sets the vulnerability assessment properties for the SQL server.
118
+ * @param condition - The condition to check.
119
+ * @param props - The vulnerability assessment properties.
120
+ * @returns An instance of ISqlBuilder.
121
+ */
35
122
  withVulnerabilityAssessmentIf(condition: boolean, props: SqlBuilderVulnerabilityAssessmentType): ISqlBuilder;
36
123
  }
@@ -3,24 +3,87 @@ import { CdnSecurityHeaderTypes } from '../../Cdn/CdnRules';
3
3
  import { ContainerProps, StorageFeatureType, StorageNetworkType, StoragePolicyType } from '../../Storage';
4
4
  import { ResourceInfo, WithEncryptionInfo } from '../../types';
5
5
  import { BuilderProps, IBuilder, ILockable } from './genericBuilder';
6
+ /**
7
+ * Arguments required for building a Storage resource.
8
+ */
6
9
  export type StorageBuilderArgs = BuilderProps & WithEncryptionInfo;
10
+ /**
11
+ * Type for defining CDN properties for a Storage resource.
12
+ */
7
13
  export type StorageCdnType = Pick<CdnEndpointProps, 'cdnProfileInfo' | 'cors' | 'domainNames'> & {
14
+ /**
15
+ * Security response headers for the CDN.
16
+ */
8
17
  securityResponse?: CdnSecurityHeaderTypes;
9
18
  };
19
+ /**
20
+ * Type for defining storage features, excluding static website enablement.
21
+ */
10
22
  export type StorageFeatureBuilderType = Omit<StorageFeatureType, 'enableStaticWebsite'>;
23
+ /**
24
+ * Interface for starting the building of a Storage resource.
25
+ */
11
26
  export interface IStorageStarterBuilder {
27
+ /**
28
+ * Initializes the builder as a standard storage resource.
29
+ * @param props - The storage feature properties.
30
+ * @returns An instance of IStorageBuilder.
31
+ */
12
32
  asStorage(props?: StorageFeatureBuilderType): IStorageBuilder;
33
+ /**
34
+ * Initializes the builder as a static web storage resource.
35
+ * @returns An instance of IStaticWebStorageBuilder.
36
+ */
13
37
  asStaticWebStorage(): IStaticWebStorageBuilder;
14
38
  }
39
+ /**
40
+ * Interface for shared storage builder methods.
41
+ */
15
42
  export interface IStorageSharedBuilder extends IBuilder<ResourceInfo>, ILockable<IStorageSharedBuilder> {
43
+ /**
44
+ * Sets the network properties for the storage resource.
45
+ * @param props - The network properties.
46
+ * @returns An instance of IStorageSharedBuilder.
47
+ */
16
48
  withNetwork(props: StorageNetworkType): IStorageSharedBuilder;
17
49
  }
50
+ /**
51
+ * Interface for building a standard Storage resource.
52
+ */
18
53
  export interface IStorageBuilder extends IBuilder<ResourceInfo>, IStorageSharedBuilder {
54
+ /**
55
+ * Adds a container to the storage resource.
56
+ * @param props - The container properties.
57
+ * @returns An instance of IStorageBuilder.
58
+ */
19
59
  withContainer(props: ContainerProps): IStorageBuilder;
60
+ /**
61
+ * Adds a queue to the storage resource.
62
+ * @param name - The name of the queue.
63
+ * @returns An instance of IStorageBuilder.
64
+ */
20
65
  withQueue(name: string): IStorageBuilder;
66
+ /**
67
+ * Adds a file share to the storage resource.
68
+ * @param name - The name of the file share.
69
+ * @returns An instance of IStorageBuilder.
70
+ */
21
71
  withFileShare(name: string): IStorageBuilder;
72
+ /**
73
+ * Sets the policies for the storage resource.
74
+ * @param props - The policy properties.
75
+ * @returns An instance of IStorageBuilder.
76
+ */
22
77
  withPolicies(props: StoragePolicyType): IStorageBuilder;
23
78
  }
79
+ /**
80
+ * Interface for building a static web Storage resource.
81
+ */
24
82
  export interface IStaticWebStorageBuilder extends IBuilder<ResourceInfo>, IStorageSharedBuilder {
83
+ /**
84
+ * Sets the CDN properties for the static web storage resource.
85
+ * @param props - The CDN properties.
86
+ * @returns An instance of IStaticWebStorageBuilder.
87
+ */
25
88
  withCdn(props: StorageCdnType): IStaticWebStorageBuilder;
26
89
  }
@@ -2,22 +2,64 @@ import { CertArgs } from '@drunk-pulumi/azure-providers';
2
2
  import { KeyVaultInfo, WithNamedType } from '../../types';
3
3
  import { Input } from '@pulumi/pulumi';
4
4
  import { BuilderProps } from './genericBuilder';
5
+ /**
6
+ * Arguments required for building a Vault resource.
7
+ */
5
8
  export type VaultBuilderArgs = Omit<BuilderProps, 'vaultInfo'>;
9
+ /**
10
+ * Type for defining secrets to be added to the vault.
11
+ */
6
12
  export type VaultBuilderSecretType = Record<string, Input<string>> | string;
13
+ /**
14
+ * Type for defining certificates to be added to the vault.
15
+ */
7
16
  export type CertBuilderType = WithNamedType & {
8
17
  cert: CertArgs;
9
18
  };
19
+ /**
20
+ * Interface for the results of the vault builder.
21
+ */
10
22
  export interface IVaultBuilderResults extends KeyVaultInfo {
23
+ /**
24
+ * Retrieves the KeyVault information.
25
+ * @returns The KeyVault information.
26
+ */
11
27
  info(): KeyVaultInfo;
12
- /**Add secrets to vault. If parameter is a string the secret will be loaded from project secret*/
28
+ /**
29
+ * Adds secrets to the vault. If the parameter is a string, the secret will be loaded from the project secret.
30
+ * @param items - The secrets to add.
31
+ * @returns An instance of IVaultBuilderResults.
32
+ */
13
33
  addSecrets(items: VaultBuilderSecretType): IVaultBuilderResults;
34
+ /**
35
+ * Adds certificates to the vault.
36
+ * @param items - The certificates to add.
37
+ * @returns An instance of IVaultBuilderResults.
38
+ */
14
39
  addCerts(items: Record<string, CertBuilderType>): IVaultBuilderResults;
40
+ /**
41
+ * Links the vault to the specified subnets via a private link.
42
+ * @param subnetIds - The IDs of the subnets to link to.
43
+ * @returns An instance of IVaultBuilderResults.
44
+ */
15
45
  privateLinkTo(subnetIds: Input<string>[]): IVaultBuilderResults;
46
+ /**
47
+ * Links the vault to the specified subnets and IP addresses.
48
+ * @param props - The linking properties.
49
+ * @returns An instance of IVaultBuilderResults.
50
+ */
16
51
  linkTo(props: {
17
52
  subnetIds: Input<string>[];
18
53
  ipAddresses: Input<string>[];
19
54
  }): IVaultBuilderResults;
20
55
  }
56
+ /**
57
+ * Interface for building a vault.
58
+ */
21
59
  export interface IVaultBuilder {
60
+ /**
61
+ * Builds the vault and returns the vault builder results.
62
+ * @returns The vault builder results.
63
+ */
22
64
  build(): IVaultBuilderResults;
23
65
  }