@gradientedge/cdk-utils 9.87.0 → 9.88.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.
@@ -1,876 +0,0 @@
1
- // https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource
2
- // generated from terraform resource schema
3
-
4
- import { Construct } from 'constructs'
5
- import * as cdktf from 'cdktf'
6
-
7
- // Configuration
8
-
9
- export interface DataAzapiResourceConfig extends cdktf.TerraformMetaArguments {
10
- /**
11
- * A map of headers to include in the request
12
- *
13
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#headers DataAzapiResource#headers}
14
- */
15
- readonly headers?: { [key: string]: string }
16
- /**
17
- * Specifies the name of the Azure resource. Exactly one of the arguments `name` or `resource_id` must be set. It could be omitted if the `type` is `Microsoft.Resources/subscriptions`.
18
- *
19
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#name DataAzapiResource#name}
20
- */
21
- readonly name?: string
22
- /**
23
- * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources:
24
- *
25
- * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group.
26
- * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group.
27
- * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to.
28
- * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60
29
- * - tenant scope: `parent_id` should be /
30
- *
31
- * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet.
32
- *
33
- * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`).
34
- *
35
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#parent_id DataAzapiResource#parent_id}
36
- */
37
- readonly parentId?: string
38
- /**
39
- * A map of query parameters to include in the request
40
- *
41
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#query_parameters DataAzapiResource#query_parameters}
42
- */
43
- readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable
44
- /**
45
- * The ID of the Azure resource to retrieve. Exactly one of the arguments `name` or `resource_id` must be set. It could be omitted if the `type` is `Microsoft.Resources/subscriptions`.
46
- *
47
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#resource_id DataAzapiResource#resource_id}
48
- */
49
- readonly resourceId?: string
50
- /**
51
- * The attribute can accept either a list or a map.
52
- *
53
- * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output.
54
- *
55
- * ```text
56
- * {
57
- * properties = {
58
- * loginServer = "registry1.azurecr.io"
59
- * policies = {
60
- * quarantinePolicy = {
61
- * status = "disabled"
62
- * }
63
- * }
64
- * }
65
- * }
66
- * ```
67
- *
68
- * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output.
69
- *
70
- * ```text
71
- * {
72
- * "login_server" = "registry1.azurecr.io"
73
- * "quarantine_status" = "disabled"
74
- * }
75
- * ```
76
- *
77
- * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/).
78
- *
79
- *
80
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#response_export_values DataAzapiResource#response_export_values}
81
- */
82
- readonly responseExportValues?: { [key: string]: any }
83
- /**
84
- * The retry block supports the following arguments:
85
- *
86
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#retry DataAzapiResource#retry}
87
- */
88
- readonly retry?: DataAzapiResourceRetry
89
- /**
90
- * In a format like `<resource-type>@<api-version>`. `<resource-type>` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `<api-version>` is version of the API used to manage this azure resource.
91
- *
92
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#type DataAzapiResource#type}
93
- */
94
- readonly type: string
95
- /**
96
- * timeouts block
97
- *
98
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#timeouts DataAzapiResource#timeouts}
99
- */
100
- readonly timeouts?: DataAzapiResourceTimeouts
101
- }
102
- export interface DataAzapiResourceIdentity {}
103
-
104
- export function dataAzapiResourceIdentityToTerraform(struct?: DataAzapiResourceIdentity): any {
105
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
106
- return struct
107
- }
108
- if (cdktf.isComplexElement(struct)) {
109
- throw new Error(
110
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
111
- )
112
- }
113
- return {}
114
- }
115
-
116
- export function dataAzapiResourceIdentityToHclTerraform(struct?: DataAzapiResourceIdentity): any {
117
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
118
- return struct
119
- }
120
- if (cdktf.isComplexElement(struct)) {
121
- throw new Error(
122
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
123
- )
124
- }
125
- const attrs = {}
126
- return attrs
127
- }
128
-
129
- export class DataAzapiResourceIdentityOutputReference extends cdktf.ComplexObject {
130
- private isEmptyObject = false
131
-
132
- /**
133
- * @param terraformResource The parent resource
134
- * @param terraformAttribute The attribute on the parent resource this class is referencing
135
- * @param complexObjectIndex the index of this item in the list
136
- * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
137
- */
138
- public constructor(
139
- terraformResource: cdktf.IInterpolatingParent,
140
- terraformAttribute: string,
141
- complexObjectIndex: number,
142
- complexObjectIsFromSet: boolean
143
- ) {
144
- super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex)
145
- }
146
-
147
- public get internalValue(): DataAzapiResourceIdentity | undefined {
148
- let hasAnyValues = this.isEmptyObject
149
- const internalValueResult: any = {}
150
- return hasAnyValues ? internalValueResult : undefined
151
- }
152
-
153
- public set internalValue(value: DataAzapiResourceIdentity | undefined) {
154
- if (value === undefined) {
155
- this.isEmptyObject = false
156
- } else {
157
- this.isEmptyObject = Object.keys(value).length === 0
158
- }
159
- }
160
-
161
- // identity_ids - computed: true, optional: false, required: false
162
- public get identityIds() {
163
- return this.getListAttribute('identity_ids')
164
- }
165
-
166
- // principal_id - computed: true, optional: false, required: false
167
- public get principalId() {
168
- return this.getStringAttribute('principal_id')
169
- }
170
-
171
- // tenant_id - computed: true, optional: false, required: false
172
- public get tenantId() {
173
- return this.getStringAttribute('tenant_id')
174
- }
175
-
176
- // type - computed: true, optional: false, required: false
177
- public get type() {
178
- return this.getStringAttribute('type')
179
- }
180
- }
181
-
182
- export class DataAzapiResourceIdentityList extends cdktf.ComplexList {
183
- /**
184
- * @param terraformResource The parent resource
185
- * @param terraformAttribute The attribute on the parent resource this class is referencing
186
- * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
187
- */
188
- constructor(
189
- protected terraformResource: cdktf.IInterpolatingParent,
190
- protected terraformAttribute: string,
191
- protected wrapsSet: boolean
192
- ) {
193
- super(terraformResource, terraformAttribute, wrapsSet)
194
- }
195
-
196
- /**
197
- * @param index the index of the item to return
198
- */
199
- public get(index: number): DataAzapiResourceIdentityOutputReference {
200
- return new DataAzapiResourceIdentityOutputReference(
201
- this.terraformResource,
202
- this.terraformAttribute,
203
- index,
204
- this.wrapsSet
205
- )
206
- }
207
- }
208
- export interface DataAzapiResourceRetry {
209
- /**
210
- * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable.
211
- *
212
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#error_message_regex DataAzapiResource#error_message_regex}
213
- */
214
- readonly errorMessageRegex: string[]
215
- /**
216
- * The base number of seconds to wait between retries. Default is `10`.
217
- *
218
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#interval_seconds DataAzapiResource#interval_seconds}
219
- */
220
- readonly intervalSeconds?: number
221
- /**
222
- * The maximum number of seconds to wait between retries. Default is `180`.
223
- *
224
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#max_interval_seconds DataAzapiResource#max_interval_seconds}
225
- */
226
- readonly maxIntervalSeconds?: number
227
- /**
228
- * The multiplier to apply to the interval between retries. Default is `1.5`.
229
- *
230
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#multiplier DataAzapiResource#multiplier}
231
- */
232
- readonly multiplier?: number
233
- /**
234
- * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`.
235
- *
236
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#randomization_factor DataAzapiResource#randomization_factor}
237
- */
238
- readonly randomizationFactor?: number
239
- }
240
-
241
- export function dataAzapiResourceRetryToTerraform(struct?: DataAzapiResourceRetry | cdktf.IResolvable): any {
242
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
243
- return struct
244
- }
245
- if (cdktf.isComplexElement(struct)) {
246
- throw new Error(
247
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
248
- )
249
- }
250
- return {
251
- error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex),
252
- interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds),
253
- max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds),
254
- multiplier: cdktf.numberToTerraform(struct!.multiplier),
255
- randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor),
256
- }
257
- }
258
-
259
- export function dataAzapiResourceRetryToHclTerraform(struct?: DataAzapiResourceRetry | cdktf.IResolvable): any {
260
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
261
- return struct
262
- }
263
- if (cdktf.isComplexElement(struct)) {
264
- throw new Error(
265
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
266
- )
267
- }
268
- const attrs = {
269
- error_message_regex: {
270
- value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex),
271
- isBlock: false,
272
- type: 'list',
273
- storageClassType: 'stringList',
274
- },
275
- interval_seconds: {
276
- value: cdktf.numberToHclTerraform(struct!.intervalSeconds),
277
- isBlock: false,
278
- type: 'simple',
279
- storageClassType: 'number',
280
- },
281
- max_interval_seconds: {
282
- value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds),
283
- isBlock: false,
284
- type: 'simple',
285
- storageClassType: 'number',
286
- },
287
- multiplier: {
288
- value: cdktf.numberToHclTerraform(struct!.multiplier),
289
- isBlock: false,
290
- type: 'simple',
291
- storageClassType: 'number',
292
- },
293
- randomization_factor: {
294
- value: cdktf.numberToHclTerraform(struct!.randomizationFactor),
295
- isBlock: false,
296
- type: 'simple',
297
- storageClassType: 'number',
298
- },
299
- }
300
-
301
- // remove undefined attributes
302
- return Object.fromEntries(
303
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
304
- )
305
- }
306
-
307
- export class DataAzapiResourceRetryOutputReference extends cdktf.ComplexObject {
308
- private isEmptyObject = false
309
- private resolvableValue?: cdktf.IResolvable
310
-
311
- /**
312
- * @param terraformResource The parent resource
313
- * @param terraformAttribute The attribute on the parent resource this class is referencing
314
- */
315
- public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) {
316
- super(terraformResource, terraformAttribute, false)
317
- }
318
-
319
- public get internalValue(): DataAzapiResourceRetry | cdktf.IResolvable | undefined {
320
- if (this.resolvableValue) {
321
- return this.resolvableValue
322
- }
323
- let hasAnyValues = this.isEmptyObject
324
- const internalValueResult: any = {}
325
- if (this._errorMessageRegex !== undefined) {
326
- hasAnyValues = true
327
- internalValueResult.errorMessageRegex = this._errorMessageRegex
328
- }
329
- if (this._intervalSeconds !== undefined) {
330
- hasAnyValues = true
331
- internalValueResult.intervalSeconds = this._intervalSeconds
332
- }
333
- if (this._maxIntervalSeconds !== undefined) {
334
- hasAnyValues = true
335
- internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds
336
- }
337
- if (this._multiplier !== undefined) {
338
- hasAnyValues = true
339
- internalValueResult.multiplier = this._multiplier
340
- }
341
- if (this._randomizationFactor !== undefined) {
342
- hasAnyValues = true
343
- internalValueResult.randomizationFactor = this._randomizationFactor
344
- }
345
- return hasAnyValues ? internalValueResult : undefined
346
- }
347
-
348
- public set internalValue(value: DataAzapiResourceRetry | cdktf.IResolvable | undefined) {
349
- if (value === undefined) {
350
- this.isEmptyObject = false
351
- this.resolvableValue = undefined
352
- this._errorMessageRegex = undefined
353
- this._intervalSeconds = undefined
354
- this._maxIntervalSeconds = undefined
355
- this._multiplier = undefined
356
- this._randomizationFactor = undefined
357
- } else if (cdktf.Tokenization.isResolvable(value)) {
358
- this.isEmptyObject = false
359
- this.resolvableValue = value
360
- } else {
361
- this.isEmptyObject = Object.keys(value).length === 0
362
- this.resolvableValue = undefined
363
- this._errorMessageRegex = value.errorMessageRegex
364
- this._intervalSeconds = value.intervalSeconds
365
- this._maxIntervalSeconds = value.maxIntervalSeconds
366
- this._multiplier = value.multiplier
367
- this._randomizationFactor = value.randomizationFactor
368
- }
369
- }
370
-
371
- // error_message_regex - computed: false, optional: false, required: true
372
- private _errorMessageRegex?: string[]
373
- public get errorMessageRegex() {
374
- return this.getListAttribute('error_message_regex')
375
- }
376
- public set errorMessageRegex(value: string[]) {
377
- this._errorMessageRegex = value
378
- }
379
- // Temporarily expose input value. Use with caution.
380
- public get errorMessageRegexInput() {
381
- return this._errorMessageRegex
382
- }
383
-
384
- // interval_seconds - computed: true, optional: true, required: false
385
- private _intervalSeconds?: number
386
- public get intervalSeconds() {
387
- return this.getNumberAttribute('interval_seconds')
388
- }
389
- public set intervalSeconds(value: number) {
390
- this._intervalSeconds = value
391
- }
392
- public resetIntervalSeconds() {
393
- this._intervalSeconds = undefined
394
- }
395
- // Temporarily expose input value. Use with caution.
396
- public get intervalSecondsInput() {
397
- return this._intervalSeconds
398
- }
399
-
400
- // max_interval_seconds - computed: true, optional: true, required: false
401
- private _maxIntervalSeconds?: number
402
- public get maxIntervalSeconds() {
403
- return this.getNumberAttribute('max_interval_seconds')
404
- }
405
- public set maxIntervalSeconds(value: number) {
406
- this._maxIntervalSeconds = value
407
- }
408
- public resetMaxIntervalSeconds() {
409
- this._maxIntervalSeconds = undefined
410
- }
411
- // Temporarily expose input value. Use with caution.
412
- public get maxIntervalSecondsInput() {
413
- return this._maxIntervalSeconds
414
- }
415
-
416
- // multiplier - computed: true, optional: true, required: false
417
- private _multiplier?: number
418
- public get multiplier() {
419
- return this.getNumberAttribute('multiplier')
420
- }
421
- public set multiplier(value: number) {
422
- this._multiplier = value
423
- }
424
- public resetMultiplier() {
425
- this._multiplier = undefined
426
- }
427
- // Temporarily expose input value. Use with caution.
428
- public get multiplierInput() {
429
- return this._multiplier
430
- }
431
-
432
- // randomization_factor - computed: true, optional: true, required: false
433
- private _randomizationFactor?: number
434
- public get randomizationFactor() {
435
- return this.getNumberAttribute('randomization_factor')
436
- }
437
- public set randomizationFactor(value: number) {
438
- this._randomizationFactor = value
439
- }
440
- public resetRandomizationFactor() {
441
- this._randomizationFactor = undefined
442
- }
443
- // Temporarily expose input value. Use with caution.
444
- public get randomizationFactorInput() {
445
- return this._randomizationFactor
446
- }
447
- }
448
- export interface DataAzapiResourceTimeouts {
449
- /**
450
- * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
451
- *
452
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#read DataAzapiResource#read}
453
- */
454
- readonly read?: string
455
- }
456
-
457
- export function dataAzapiResourceTimeoutsToTerraform(struct?: DataAzapiResourceTimeouts | cdktf.IResolvable): any {
458
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
459
- return struct
460
- }
461
- if (cdktf.isComplexElement(struct)) {
462
- throw new Error(
463
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
464
- )
465
- }
466
- return {
467
- read: cdktf.stringToTerraform(struct!.read),
468
- }
469
- }
470
-
471
- export function dataAzapiResourceTimeoutsToHclTerraform(struct?: DataAzapiResourceTimeouts | cdktf.IResolvable): any {
472
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
473
- return struct
474
- }
475
- if (cdktf.isComplexElement(struct)) {
476
- throw new Error(
477
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
478
- )
479
- }
480
- const attrs = {
481
- read: {
482
- value: cdktf.stringToHclTerraform(struct!.read),
483
- isBlock: false,
484
- type: 'simple',
485
- storageClassType: 'string',
486
- },
487
- }
488
-
489
- // remove undefined attributes
490
- return Object.fromEntries(
491
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
492
- )
493
- }
494
-
495
- export class DataAzapiResourceTimeoutsOutputReference extends cdktf.ComplexObject {
496
- private isEmptyObject = false
497
- private resolvableValue?: cdktf.IResolvable
498
-
499
- /**
500
- * @param terraformResource The parent resource
501
- * @param terraformAttribute The attribute on the parent resource this class is referencing
502
- */
503
- public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) {
504
- super(terraformResource, terraformAttribute, false)
505
- }
506
-
507
- public get internalValue(): DataAzapiResourceTimeouts | cdktf.IResolvable | undefined {
508
- if (this.resolvableValue) {
509
- return this.resolvableValue
510
- }
511
- let hasAnyValues = this.isEmptyObject
512
- const internalValueResult: any = {}
513
- if (this._read !== undefined) {
514
- hasAnyValues = true
515
- internalValueResult.read = this._read
516
- }
517
- return hasAnyValues ? internalValueResult : undefined
518
- }
519
-
520
- public set internalValue(value: DataAzapiResourceTimeouts | cdktf.IResolvable | undefined) {
521
- if (value === undefined) {
522
- this.isEmptyObject = false
523
- this.resolvableValue = undefined
524
- this._read = undefined
525
- } else if (cdktf.Tokenization.isResolvable(value)) {
526
- this.isEmptyObject = false
527
- this.resolvableValue = value
528
- } else {
529
- this.isEmptyObject = Object.keys(value).length === 0
530
- this.resolvableValue = undefined
531
- this._read = value.read
532
- }
533
- }
534
-
535
- // read - computed: false, optional: true, required: false
536
- private _read?: string
537
- public get read() {
538
- return this.getStringAttribute('read')
539
- }
540
- public set read(value: string) {
541
- this._read = value
542
- }
543
- public resetRead() {
544
- this._read = undefined
545
- }
546
- // Temporarily expose input value. Use with caution.
547
- public get readInput() {
548
- return this._read
549
- }
550
- }
551
-
552
- /**
553
- * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource azapi_resource}
554
- */
555
- export class DataAzapiResource extends cdktf.TerraformDataSource {
556
- // =================
557
- // STATIC PROPERTIES
558
- // =================
559
- public static readonly tfResourceType = 'azapi_resource'
560
-
561
- // ==============
562
- // STATIC Methods
563
- // ==============
564
- /**
565
- * Generates CDKTF code for importing a DataAzapiResource resource upon running "cdktf plan <stack-name>"
566
- * @param scope The scope in which to define this construct
567
- * @param importToId The construct id used in the generated config for the DataAzapiResource to import
568
- * @param importFromId The id of the existing DataAzapiResource that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#import import section} in the documentation of this resource for the id to use
569
- * @param provider? Optional instance of the provider where the DataAzapiResource to import is found
570
- */
571
- public static generateConfigForImport(
572
- scope: Construct,
573
- importToId: string,
574
- importFromId: string,
575
- provider?: cdktf.TerraformProvider
576
- ) {
577
- return new cdktf.ImportableResource(scope, importToId, {
578
- terraformResourceType: 'azapi_resource',
579
- importId: importFromId,
580
- provider,
581
- })
582
- }
583
-
584
- // ===========
585
- // INITIALIZER
586
- // ===========
587
-
588
- /**
589
- * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource azapi_resource} Data Source
590
- *
591
- * @param scope The scope in which to define this construct
592
- * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
593
- * @param options DataAzapiResourceConfig
594
- */
595
- public constructor(scope: Construct, id: string, config: DataAzapiResourceConfig) {
596
- super(scope, id, {
597
- terraformResourceType: 'azapi_resource',
598
- terraformGeneratorMetadata: {
599
- providerName: 'azapi',
600
- providerVersion: '2.2.0',
601
- providerVersionConstraint: '~> 2.2',
602
- },
603
- provider: config.provider,
604
- dependsOn: config.dependsOn,
605
- count: config.count,
606
- lifecycle: config.lifecycle,
607
- provisioners: config.provisioners,
608
- connection: config.connection,
609
- forEach: config.forEach,
610
- })
611
- this._headers = config.headers
612
- this._name = config.name
613
- this._parentId = config.parentId
614
- this._queryParameters = config.queryParameters
615
- this._resourceId = config.resourceId
616
- this._responseExportValues = config.responseExportValues
617
- this._retry.internalValue = config.retry
618
- this._type = config.type
619
- this._timeouts.internalValue = config.timeouts
620
- }
621
-
622
- // ==========
623
- // ATTRIBUTES
624
- // ==========
625
-
626
- // headers - computed: false, optional: true, required: false
627
- private _headers?: { [key: string]: string }
628
- public get headers() {
629
- return this.getStringMapAttribute('headers')
630
- }
631
- public set headers(value: { [key: string]: string }) {
632
- this._headers = value
633
- }
634
- public resetHeaders() {
635
- this._headers = undefined
636
- }
637
- // Temporarily expose input value. Use with caution.
638
- public get headersInput() {
639
- return this._headers
640
- }
641
-
642
- // id - computed: true, optional: false, required: false
643
- public get id() {
644
- return this.getStringAttribute('id')
645
- }
646
-
647
- // identity - computed: true, optional: false, required: false
648
- private _identity = new DataAzapiResourceIdentityList(this, 'identity', false)
649
- public get identity() {
650
- return this._identity
651
- }
652
-
653
- // location - computed: true, optional: false, required: false
654
- public get location() {
655
- return this.getStringAttribute('location')
656
- }
657
-
658
- // name - computed: true, optional: true, required: false
659
- private _name?: string
660
- public get name() {
661
- return this.getStringAttribute('name')
662
- }
663
- public set name(value: string) {
664
- this._name = value
665
- }
666
- public resetName() {
667
- this._name = undefined
668
- }
669
- // Temporarily expose input value. Use with caution.
670
- public get nameInput() {
671
- return this._name
672
- }
673
-
674
- // output - computed: true, optional: false, required: false
675
- private _output = new cdktf.AnyMap(this, 'output')
676
- public get output() {
677
- return this._output
678
- }
679
-
680
- // parent_id - computed: true, optional: true, required: false
681
- private _parentId?: string
682
- public get parentId() {
683
- return this.getStringAttribute('parent_id')
684
- }
685
- public set parentId(value: string) {
686
- this._parentId = value
687
- }
688
- public resetParentId() {
689
- this._parentId = undefined
690
- }
691
- // Temporarily expose input value. Use with caution.
692
- public get parentIdInput() {
693
- return this._parentId
694
- }
695
-
696
- // query_parameters - computed: false, optional: true, required: false
697
- private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable
698
- public get queryParameters() {
699
- return this.interpolationForAttribute('query_parameters')
700
- }
701
- public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) {
702
- this._queryParameters = value
703
- }
704
- public resetQueryParameters() {
705
- this._queryParameters = undefined
706
- }
707
- // Temporarily expose input value. Use with caution.
708
- public get queryParametersInput() {
709
- return this._queryParameters
710
- }
711
-
712
- // resource_id - computed: true, optional: true, required: false
713
- private _resourceId?: string
714
- public get resourceId() {
715
- return this.getStringAttribute('resource_id')
716
- }
717
- public set resourceId(value: string) {
718
- this._resourceId = value
719
- }
720
- public resetResourceId() {
721
- this._resourceId = undefined
722
- }
723
- // Temporarily expose input value. Use with caution.
724
- public get resourceIdInput() {
725
- return this._resourceId
726
- }
727
-
728
- // response_export_values - computed: false, optional: true, required: false
729
- private _responseExportValues?: { [key: string]: any }
730
- public get responseExportValues() {
731
- return this.getAnyMapAttribute('response_export_values')
732
- }
733
- public set responseExportValues(value: { [key: string]: any }) {
734
- this._responseExportValues = value
735
- }
736
- public resetResponseExportValues() {
737
- this._responseExportValues = undefined
738
- }
739
- // Temporarily expose input value. Use with caution.
740
- public get responseExportValuesInput() {
741
- return this._responseExportValues
742
- }
743
-
744
- // retry - computed: false, optional: true, required: false
745
- private _retry = new DataAzapiResourceRetryOutputReference(this, 'retry')
746
- public get retry() {
747
- return this._retry
748
- }
749
- public putRetry(value: DataAzapiResourceRetry) {
750
- this._retry.internalValue = value
751
- }
752
- public resetRetry() {
753
- this._retry.internalValue = undefined
754
- }
755
- // Temporarily expose input value. Use with caution.
756
- public get retryInput() {
757
- return this._retry.internalValue
758
- }
759
-
760
- // tags - computed: true, optional: false, required: false
761
- private _tags = new cdktf.StringMap(this, 'tags')
762
- public get tags() {
763
- return this._tags
764
- }
765
-
766
- // type - computed: false, optional: false, required: true
767
- private _type?: string
768
- public get type() {
769
- return this.getStringAttribute('type')
770
- }
771
- public set type(value: string) {
772
- this._type = value
773
- }
774
- // Temporarily expose input value. Use with caution.
775
- public get typeInput() {
776
- return this._type
777
- }
778
-
779
- // timeouts - computed: false, optional: true, required: false
780
- private _timeouts = new DataAzapiResourceTimeoutsOutputReference(this, 'timeouts')
781
- public get timeouts() {
782
- return this._timeouts
783
- }
784
- public putTimeouts(value: DataAzapiResourceTimeouts) {
785
- this._timeouts.internalValue = value
786
- }
787
- public resetTimeouts() {
788
- this._timeouts.internalValue = undefined
789
- }
790
- // Temporarily expose input value. Use with caution.
791
- public get timeoutsInput() {
792
- return this._timeouts.internalValue
793
- }
794
-
795
- // =========
796
- // SYNTHESIS
797
- // =========
798
-
799
- protected synthesizeAttributes(): { [name: string]: any } {
800
- return {
801
- headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers),
802
- name: cdktf.stringToTerraform(this._name),
803
- parent_id: cdktf.stringToTerraform(this._parentId),
804
- query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters),
805
- resource_id: cdktf.stringToTerraform(this._resourceId),
806
- response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues),
807
- retry: dataAzapiResourceRetryToTerraform(this._retry.internalValue),
808
- type: cdktf.stringToTerraform(this._type),
809
- timeouts: dataAzapiResourceTimeoutsToTerraform(this._timeouts.internalValue),
810
- }
811
- }
812
-
813
- protected synthesizeHclAttributes(): { [name: string]: any } {
814
- const attrs = {
815
- headers: {
816
- value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers),
817
- isBlock: false,
818
- type: 'map',
819
- storageClassType: 'stringMap',
820
- },
821
- name: {
822
- value: cdktf.stringToHclTerraform(this._name),
823
- isBlock: false,
824
- type: 'simple',
825
- storageClassType: 'string',
826
- },
827
- parent_id: {
828
- value: cdktf.stringToHclTerraform(this._parentId),
829
- isBlock: false,
830
- type: 'simple',
831
- storageClassType: 'string',
832
- },
833
- query_parameters: {
834
- value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters),
835
- isBlock: false,
836
- type: 'map',
837
- storageClassType: 'stringListMap',
838
- },
839
- resource_id: {
840
- value: cdktf.stringToHclTerraform(this._resourceId),
841
- isBlock: false,
842
- type: 'simple',
843
- storageClassType: 'string',
844
- },
845
- response_export_values: {
846
- value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues),
847
- isBlock: false,
848
- type: 'map',
849
- storageClassType: 'anyMap',
850
- },
851
- retry: {
852
- value: dataAzapiResourceRetryToHclTerraform(this._retry.internalValue),
853
- isBlock: true,
854
- type: 'struct',
855
- storageClassType: 'DataAzapiResourceRetry',
856
- },
857
- type: {
858
- value: cdktf.stringToHclTerraform(this._type),
859
- isBlock: false,
860
- type: 'simple',
861
- storageClassType: 'string',
862
- },
863
- timeouts: {
864
- value: dataAzapiResourceTimeoutsToHclTerraform(this._timeouts.internalValue),
865
- isBlock: true,
866
- type: 'struct',
867
- storageClassType: 'DataAzapiResourceTimeouts',
868
- },
869
- }
870
-
871
- // remove undefined attributes
872
- return Object.fromEntries(
873
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
874
- )
875
- }
876
- }