@gradientedge/cdk-utils-azure 1.0.1 → 2.1.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/README.md +30 -0
- package/dist/src/common/constants.d.ts +4 -0
- package/dist/src/common/constants.js +3 -0
- package/dist/src/common/construct.d.ts +2 -1
- package/dist/src/common/construct.js +4 -3
- package/dist/src/common/resource-name-formatter.d.ts +2 -1
- package/dist/src/common/resource-name-formatter.js +3 -2
- package/dist/src/common/stack.d.ts +2 -1
- package/dist/src/common/stack.js +5 -4
- package/dist/src/common/tagging.d.ts +3 -0
- package/dist/src/common/tagging.js +3 -0
- package/dist/src/common/types.d.ts +5 -1
- package/dist/src/construct/event-handler/main.d.ts +2 -1
- package/dist/src/construct/event-handler/main.js +2 -1
- package/dist/src/construct/event-handler/types.d.ts +6 -0
- package/dist/src/construct/function-app/main.d.ts +2 -1
- package/dist/src/construct/function-app/main.js +4 -3
- package/dist/src/construct/function-app/types.d.ts +3 -0
- package/dist/src/construct/rest-api/main.d.ts +2 -1
- package/dist/src/construct/rest-api/main.js +2 -1
- package/dist/src/construct/rest-api/types.d.ts +3 -0
- package/dist/src/construct/rest-api-function/main.d.ts +2 -1
- package/dist/src/construct/rest-api-function/main.js +2 -1
- package/dist/src/construct/rest-api-function/types.d.ts +4 -0
- package/dist/src/construct/rest-api-with-cache/main.d.ts +2 -1
- package/dist/src/construct/rest-api-with-cache/main.js +2 -1
- package/dist/src/construct/rest-api-with-cache/types.d.ts +2 -0
- package/dist/src/construct/site-with-webapp/main.d.ts +2 -1
- package/dist/src/construct/site-with-webapp/main.js +4 -3
- package/dist/src/construct/site-with-webapp/types.d.ts +3 -0
- package/dist/src/services/api-management/main.d.ts +5 -8
- package/dist/src/services/api-management/main.js +14 -17
- package/dist/src/services/api-management/types.d.ts +17 -0
- package/dist/src/services/app-configuration/main.d.ts +2 -1
- package/dist/src/services/app-configuration/main.js +4 -3
- package/dist/src/services/app-configuration/types.d.ts +1 -0
- package/dist/src/services/app-service/main.d.ts +2 -1
- package/dist/src/services/app-service/main.js +6 -5
- package/dist/src/services/app-service/types.d.ts +3 -2
- package/dist/src/services/application-insights/main.d.ts +2 -1
- package/dist/src/services/application-insights/main.js +5 -4
- package/dist/src/services/application-insights/types.d.ts +2 -0
- package/dist/src/services/authorisation/constants.d.ts +1 -0
- package/dist/src/services/authorisation/constants.js +1 -0
- package/dist/src/services/authorisation/main.d.ts +2 -1
- package/dist/src/services/authorisation/main.js +3 -2
- package/dist/src/services/authorisation/types.d.ts +1 -0
- package/dist/src/services/cosmosdb/constants.d.ts +2 -0
- package/dist/src/services/cosmosdb/constants.js +2 -0
- package/dist/src/services/cosmosdb/main.d.ts +2 -1
- package/dist/src/services/cosmosdb/main.js +8 -7
- package/dist/src/services/cosmosdb/types.d.ts +4 -0
- package/dist/src/services/dns/main.d.ts +2 -1
- package/dist/src/services/dns/main.js +7 -6
- package/dist/src/services/dns/types.d.ts +4 -0
- package/dist/src/services/eventgrid/main.d.ts +2 -1
- package/dist/src/services/eventgrid/main.js +11 -10
- package/dist/src/services/eventgrid/types.d.ts +5 -0
- package/dist/src/services/function/main.d.ts +3 -2
- package/dist/src/services/function/main.js +10 -9
- package/dist/src/services/function/types.d.ts +3 -0
- package/dist/src/services/key-vault/main.d.ts +2 -1
- package/dist/src/services/key-vault/main.js +5 -4
- package/dist/src/services/key-vault/types.d.ts +2 -0
- package/dist/src/services/monitor/main.d.ts +2 -1
- package/dist/src/services/monitor/main.js +3 -2
- package/dist/src/services/monitor/types.d.ts +1 -0
- package/dist/src/services/operational-insights/main.d.ts +2 -1
- package/dist/src/services/operational-insights/main.js +5 -4
- package/dist/src/services/operational-insights/types.d.ts +2 -0
- package/dist/src/services/portal/error.d.ts +1 -0
- package/dist/src/services/portal/error.js +1 -0
- package/dist/src/services/portal/main.d.ts +2 -1
- package/dist/src/services/portal/main.js +4 -3
- package/dist/src/services/portal/renderer.d.ts +1 -0
- package/dist/src/services/portal/renderer.js +3 -2
- package/dist/src/services/portal/types.d.ts +7 -0
- package/dist/src/services/redis/main.d.ts +2 -1
- package/dist/src/services/redis/main.js +4 -3
- package/dist/src/services/redis/types.d.ts +1 -0
- package/dist/src/services/resource-group/main.d.ts +2 -1
- package/dist/src/services/resource-group/main.js +4 -3
- package/dist/src/services/resource-group/types.d.ts +1 -0
- package/dist/src/services/security-center/main.d.ts +2 -1
- package/dist/src/services/security-center/main.js +3 -2
- package/dist/src/services/security-center/types.d.ts +1 -0
- package/dist/src/services/servicebus/main.d.ts +2 -1
- package/dist/src/services/servicebus/main.js +8 -7
- package/dist/src/services/servicebus/types.d.ts +5 -0
- package/dist/src/services/storage/main.d.ts +2 -2
- package/dist/src/services/storage/main.js +7 -7
- package/dist/src/services/storage/types.d.ts +6 -0
- package/dist/src/types/index.d.ts +1 -0
- package/package.json +14 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Redis, SkuFamily, SkuName } from '@pulumi/azure-native/redis/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Redis using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { Redis, SkuFamily, SkuName } from '@pulumi/azure-native/redis/index.js';
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureRedisManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureRedisManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createManagedRedis(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Redis(`${id}-rc`, {
|
|
38
39
|
...props,
|
|
39
40
|
name: scope.resourceNameFormatter.format(props.name?.toString(), scope.props.resourceNameOptions?.managedRedis),
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { ResourceGroupProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Resource Group using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { ResourceGroupProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureResourceGroupManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getResourceGroupOutput, ResourceGroup } from '@pulumi/azure-native/resources/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Resource Group using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { getResourceGroupOutput, ResourceGroup } from '@pulumi/azure-native/reso
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureResourceGroupManager {
|
|
20
21
|
/**
|
|
@@ -27,7 +28,7 @@ export class AzureResourceGroupManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createResourceGroup(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
return new ResourceGroup(`${id}-rg`, {
|
|
32
33
|
...props,
|
|
33
34
|
resourceGroupName: scope.resourceNameFormatter.format(props.resourceGroupName?.toString(), scope.props.resourceNameOptions?.resourceGroup),
|
|
@@ -45,7 +46,7 @@ export class AzureResourceGroupManager {
|
|
|
45
46
|
*/
|
|
46
47
|
resolveResourceGroup(scope, resourceGroupName, resourceOptions) {
|
|
47
48
|
if (!resourceGroupName)
|
|
48
|
-
throw `Resource Group Name undefined
|
|
49
|
+
throw new Error(`Resource Group Name undefined`);
|
|
49
50
|
return getResourceGroupOutput({
|
|
50
51
|
resourceGroupName: scope.resourceNameFormatter.format(resourceGroupName?.toString(), scope.props.resourceNameOptions?.resourceGroup),
|
|
51
52
|
}, { parent: scope, ...resourceOptions });
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { DefenderForStorageProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Security Center using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { DefenderForStorageProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureSecurityCentermanager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefenderForStorage } from '@pulumi/azure-native/security/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Security Center using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { DefenderForStorage } from '@pulumi/azure-native/security/index.js';
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureSecurityCentermanager {
|
|
20
21
|
/**
|
|
@@ -27,7 +28,7 @@ export class AzureSecurityCentermanager {
|
|
|
27
28
|
*/
|
|
28
29
|
createDefenderForStorage(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
return new DefenderForStorage(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { ResolveServicebusQueueProps, ServiceBusNamespaceProps, ServiceBusQueueProps, ServiceBusSubscriptionProps, ServiceBusTopicProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Servicebus using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { ResolveServicebusQueueProps, ServiceBusNamespaceProps, ServiceBusQueueP
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureServiceBusManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getQueueOutput, ManagedServiceIdentityType, Namespace, Queue, SkuName, Subscription, Topic, } from '@pulumi/azure-native/servicebus/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Servicebus using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { getQueueOutput, ManagedServiceIdentityType, Namespace, Queue, SkuName,
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureServiceBusManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureServiceBusManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createServiceBusNamespace(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Namespace(`${id}-sn`, {
|
|
38
39
|
...props,
|
|
39
40
|
namespaceName: scope.resourceNameFormatter.format(props.namespaceName?.toString(), scope.props.resourceNameOptions?.serviceBusNamespace),
|
|
@@ -60,7 +61,7 @@ export class AzureServiceBusManager {
|
|
|
60
61
|
*/
|
|
61
62
|
createServiceBusTopic(id, scope, props, resourceOptions) {
|
|
62
63
|
if (!props)
|
|
63
|
-
throw `Props undefined for ${id}
|
|
64
|
+
throw new Error(`Props undefined for ${id}`);
|
|
64
65
|
return new Topic(`${id}-st`, {
|
|
65
66
|
...props,
|
|
66
67
|
topicName: scope.resourceNameFormatter.format(props.topicName?.toString(), scope.props.resourceNameOptions?.serviceBusTopic),
|
|
@@ -78,7 +79,7 @@ export class AzureServiceBusManager {
|
|
|
78
79
|
*/
|
|
79
80
|
createServiceBusQueue(id, scope, props, resourceOptions) {
|
|
80
81
|
if (!props)
|
|
81
|
-
throw `Props undefined for ${id}
|
|
82
|
+
throw new Error(`Props undefined for ${id}`);
|
|
82
83
|
return new Queue(`${id}-sq`, {
|
|
83
84
|
...props,
|
|
84
85
|
queueName: scope.resourceNameFormatter.format(props.queueName?.toString(), scope.props.resourceNameOptions?.serviceBusQueue),
|
|
@@ -100,7 +101,7 @@ export class AzureServiceBusManager {
|
|
|
100
101
|
*/
|
|
101
102
|
createServiceBusSubscription(id, scope, props, resourceOptions) {
|
|
102
103
|
if (!props)
|
|
103
|
-
throw `Props undefined for ${id}
|
|
104
|
+
throw new Error(`Props undefined for ${id}`);
|
|
104
105
|
return new Subscription(`${id}-ss`, {
|
|
105
106
|
...props,
|
|
106
107
|
subscriptionName: scope.resourceNameFormatter.format(props.subscriptionName?.toString(), scope.props.resourceNameOptions?.serviceBusSubscription),
|
|
@@ -117,7 +118,7 @@ export class AzureServiceBusManager {
|
|
|
117
118
|
*/
|
|
118
119
|
resolveServiceBusQueue(id, scope, props, resourceOptions) {
|
|
119
120
|
if (!props)
|
|
120
|
-
throw `Props undefined for ${id}
|
|
121
|
+
throw new Error(`Props undefined for ${id}`);
|
|
121
122
|
return getQueueOutput({
|
|
122
123
|
queueName: scope.resourceNameFormatter.format(props.queueName?.toString(), scope.props.resourceNameOptions?.serviceBusQueue),
|
|
123
124
|
namespaceName: props.namespaceName,
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { GetQueueOutputArgs, NamespaceArgs, QueueArgs, SubscriptionArgs, TopicArgs } from '@pulumi/azure-native/servicebus/index.js';
|
|
2
|
+
/** @category Interface */
|
|
2
3
|
export interface ServiceBusNamespaceProps extends NamespaceArgs {
|
|
3
4
|
}
|
|
5
|
+
/** @category Interface */
|
|
4
6
|
export interface ServiceBusTopicProps extends TopicArgs {
|
|
5
7
|
}
|
|
8
|
+
/** @category Interface */
|
|
6
9
|
export interface ServiceBusQueueProps extends QueueArgs {
|
|
7
10
|
}
|
|
11
|
+
/** @category Interface */
|
|
8
12
|
export interface ServiceBusSubscriptionProps extends SubscriptionArgs {
|
|
9
13
|
}
|
|
14
|
+
/** @category Interface */
|
|
10
15
|
export interface ResolveServicebusQueueProps extends GetQueueOutputArgs {
|
|
11
16
|
}
|
|
@@ -4,7 +4,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
4
4
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
5
5
|
import { ContainerSasTokenProps, ManagementPolicyProps, StorageAccountProps, StorageBlobProps, StorageContainerProps, StorageTableProps } from './types.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Provides operations on Azure Storage using Pulumi
|
|
8
8
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
9
9
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
10
10
|
* @example
|
|
@@ -19,6 +19,7 @@ import { ContainerSasTokenProps, ManagementPolicyProps, StorageAccountProps, Sto
|
|
|
19
19
|
* }
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
|
+
* @category Service
|
|
22
23
|
*/
|
|
23
24
|
export declare class AzureStorageManager {
|
|
24
25
|
/**
|
|
@@ -51,7 +52,6 @@ export declare class AzureStorageManager {
|
|
|
51
52
|
/**
|
|
52
53
|
* @summary Generates a container-level SAS token for an existing Azure Storage container.
|
|
53
54
|
*
|
|
54
|
-
* @description
|
|
55
55
|
* This method generates a Shared Access Signature (SAS) token for secure container access.
|
|
56
56
|
* The token is generated using Pulumi's listStorageAccountSAS function.
|
|
57
57
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Blob, BlobContainer, BlobServiceProperties, HttpProtocol, Kind, listStorageAccountSAS, ManagementPolicy, Permissions, Services, SignedResourceTypes, SkuName, StorageAccount, Table, } from '@pulumi/azure-native/storage/index.js';
|
|
2
2
|
import * as pulumi from '@pulumi/pulumi';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Provides operations on Azure Storage using Pulumi
|
|
5
5
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
6
6
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
7
7
|
* @example
|
|
@@ -16,6 +16,7 @@ import * as pulumi from '@pulumi/pulumi';
|
|
|
16
16
|
* }
|
|
17
17
|
* }
|
|
18
18
|
* ```
|
|
19
|
+
* @category Service
|
|
19
20
|
*/
|
|
20
21
|
export class AzureStorageManager {
|
|
21
22
|
/**
|
|
@@ -28,7 +29,7 @@ export class AzureStorageManager {
|
|
|
28
29
|
*/
|
|
29
30
|
createStorageAccount(id, scope, props, resourceOptions) {
|
|
30
31
|
if (!props)
|
|
31
|
-
throw `Props undefined for ${id}
|
|
32
|
+
throw new Error(`Props undefined for ${id}`);
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: `${props.resourceGroupName}`;
|
|
@@ -73,7 +74,7 @@ export class AzureStorageManager {
|
|
|
73
74
|
*/
|
|
74
75
|
createStorageContainer(id, scope, props, resourceOptions) {
|
|
75
76
|
if (!props)
|
|
76
|
-
throw `Props undefined for ${id}
|
|
77
|
+
throw new Error(`Props undefined for ${id}`);
|
|
77
78
|
const resourceGroupName = scope.props.resourceGroupName
|
|
78
79
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
79
80
|
: `${props.resourceGroupName}`;
|
|
@@ -94,7 +95,7 @@ export class AzureStorageManager {
|
|
|
94
95
|
*/
|
|
95
96
|
createStorageBlob(id, scope, props, resourceOptions) {
|
|
96
97
|
if (!props)
|
|
97
|
-
throw `Props undefined for ${id}
|
|
98
|
+
throw new Error(`Props undefined for ${id}`);
|
|
98
99
|
const resourceGroupName = scope.props.resourceGroupName
|
|
99
100
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
100
101
|
: `${props.resourceGroupName}`;
|
|
@@ -109,7 +110,6 @@ export class AzureStorageManager {
|
|
|
109
110
|
/**
|
|
110
111
|
* @summary Generates a container-level SAS token for an existing Azure Storage container.
|
|
111
112
|
*
|
|
112
|
-
* @description
|
|
113
113
|
* This method generates a Shared Access Signature (SAS) token for secure container access.
|
|
114
114
|
* The token is generated using Pulumi's listStorageAccountSAS function.
|
|
115
115
|
*
|
|
@@ -154,7 +154,7 @@ export class AzureStorageManager {
|
|
|
154
154
|
*/
|
|
155
155
|
createManagementPolicy(id, scope, props, resourceOptions) {
|
|
156
156
|
if (!props)
|
|
157
|
-
throw `Props undefined for ${id}
|
|
157
|
+
throw new Error(`Props undefined for ${id}`);
|
|
158
158
|
return new ManagementPolicy(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
@@ -167,7 +167,7 @@ export class AzureStorageManager {
|
|
|
167
167
|
*/
|
|
168
168
|
createTable(id, scope, props, resourceOptions) {
|
|
169
169
|
if (!props)
|
|
170
|
-
throw `Props undefined for ${id}
|
|
170
|
+
throw new Error(`Props undefined for ${id}`);
|
|
171
171
|
return new Table(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { BlobArgs, BlobContainerArgs, BlobServicePropertiesArgs, ListStorageAccountSASArgs, ManagementPolicyArgs, StorageAccountArgs, TableArgs } from '@pulumi/azure-native/storage/index.js';
|
|
2
2
|
import { BaseAzureConfigProps } from '../../types/index.js';
|
|
3
|
+
/** @category Interface */
|
|
3
4
|
export interface StorageAccountProps extends StorageAccountArgs {
|
|
4
5
|
blobProperties?: BlobServicePropertiesArgs;
|
|
5
6
|
}
|
|
7
|
+
/** @category Interface */
|
|
6
8
|
export interface StorageContainerProps extends BlobContainerArgs, BaseAzureConfigProps {
|
|
7
9
|
}
|
|
10
|
+
/** @category Interface */
|
|
8
11
|
export interface StorageBlobProps extends BaseAzureConfigProps, BlobArgs {
|
|
9
12
|
}
|
|
13
|
+
/** @category Interface */
|
|
10
14
|
export interface ManagementPolicyProps extends ManagementPolicyArgs {
|
|
11
15
|
}
|
|
16
|
+
/** @category Interface */
|
|
12
17
|
export interface StorageTableProps extends TableArgs {
|
|
13
18
|
}
|
|
19
|
+
/** @category Interface */
|
|
14
20
|
export interface ContainerSasTokenProps extends ListStorageAccountSASArgs {
|
|
15
21
|
resourceGroupName: string;
|
|
16
22
|
containerName?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils-azure",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -16,13 +16,20 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@pulumi/archive": "0.3.7",
|
|
18
18
|
"@pulumi/azure-native": "3.16.0",
|
|
19
|
-
"@pulumi/pulumi": "3.
|
|
19
|
+
"@pulumi/pulumi": "3.229.0",
|
|
20
20
|
"@types/lodash": "4.17.24",
|
|
21
21
|
"app-root-path": "3.1.0",
|
|
22
22
|
"lodash": "4.18.1",
|
|
23
23
|
"yaml": "2.8.3",
|
|
24
|
-
"@gradientedge/cdk-utils-common": "1.0
|
|
24
|
+
"@gradientedge/cdk-utils-common": "2.1.0"
|
|
25
25
|
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"gradientedge",
|
|
28
|
+
"azure",
|
|
29
|
+
"pulumi",
|
|
30
|
+
"iac",
|
|
31
|
+
"typescript"
|
|
32
|
+
],
|
|
26
33
|
"publishConfig": {
|
|
27
34
|
"access": "public"
|
|
28
35
|
},
|
|
@@ -32,6 +39,10 @@
|
|
|
32
39
|
"url": "git+https://github.com/gradientedge/cdk-utils.git",
|
|
33
40
|
"directory": "packages/azure"
|
|
34
41
|
},
|
|
42
|
+
"typedocOptions": {
|
|
43
|
+
"gitRevision": "main",
|
|
44
|
+
"sourceLinkTemplate": "https://github.com/gradientedge/cdk-utils/blob/main/{path}#L{line}"
|
|
45
|
+
},
|
|
35
46
|
"scripts": {
|
|
36
47
|
"build": "tsc",
|
|
37
48
|
"build:production": "tsc -p tsconfig.prd.json",
|