@gradientedge/cdk-utils 9.86.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,935 +0,0 @@
1
- // https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action
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 ResourceActionConfig extends cdktf.TerraformMetaArguments {
10
- /**
11
- * The name of the resource action. It's also possible to make HTTP requests towards the resource ID if leave this field empty.
12
- *
13
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#action ResourceAction#action}
14
- */
15
- readonly action?: string
16
- /**
17
- * A dynamic attribute that contains the request body.
18
- *
19
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#body ResourceAction#body}
20
- */
21
- readonly body?: { [key: string]: any }
22
- /**
23
- * A map of headers to include in the request
24
- *
25
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#headers ResourceAction#headers}
26
- */
27
- readonly headers?: { [key: string]: string }
28
- /**
29
- * A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time.
30
- *
31
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#locks ResourceAction#locks}
32
- */
33
- readonly locks?: string[]
34
- /**
35
- * Specifies the HTTP method of the azure resource action. Allowed values are `POST`, `PATCH`, `PUT` and `DELETE`. Defaults to `POST`.
36
- *
37
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#method ResourceAction#method}
38
- */
39
- readonly method?: string
40
- /**
41
- * A map of query parameters to include in the request
42
- *
43
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#query_parameters ResourceAction#query_parameters}
44
- */
45
- readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable
46
- /**
47
- * The ID of an existing Azure source.
48
- *
49
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#resource_id ResourceAction#resource_id}
50
- */
51
- readonly resourceId: string
52
- /**
53
- * The attribute can accept either a list or a map.
54
- *
55
- * - **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.
56
- *
57
- * ```text
58
- * {
59
- * properties = {
60
- * loginServer = "registry1.azurecr.io"
61
- * policies = {
62
- * quarantinePolicy = {
63
- * status = "disabled"
64
- * }
65
- * }
66
- * }
67
- * }
68
- * ```
69
- *
70
- * - **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.
71
- *
72
- * ```text
73
- * {
74
- * "login_server" = "registry1.azurecr.io"
75
- * "quarantine_status" = "disabled"
76
- * }
77
- * ```
78
- *
79
- * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/).
80
- *
81
- *
82
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#response_export_values ResourceAction#response_export_values}
83
- */
84
- readonly responseExportValues?: { [key: string]: any }
85
- /**
86
- * The retry block supports the following arguments:
87
- *
88
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#retry ResourceAction#retry}
89
- */
90
- readonly retry?: ResourceActionRetry
91
- /**
92
- * 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.
93
- *
94
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#type ResourceAction#type}
95
- */
96
- readonly type: string
97
- /**
98
- * When to perform the action, value must be one of: `apply`, `destroy`. Default is `apply`.
99
- *
100
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#when ResourceAction#when}
101
- */
102
- readonly when?: string
103
- /**
104
- * timeouts block
105
- *
106
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#timeouts ResourceAction#timeouts}
107
- */
108
- readonly timeouts?: ResourceActionTimeouts
109
- }
110
- export interface ResourceActionRetry {
111
- /**
112
- * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable.
113
- *
114
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#error_message_regex ResourceAction#error_message_regex}
115
- */
116
- readonly errorMessageRegex: string[]
117
- /**
118
- * The base number of seconds to wait between retries. Default is `10`.
119
- *
120
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#interval_seconds ResourceAction#interval_seconds}
121
- */
122
- readonly intervalSeconds?: number
123
- /**
124
- * The maximum number of seconds to wait between retries. Default is `180`.
125
- *
126
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#max_interval_seconds ResourceAction#max_interval_seconds}
127
- */
128
- readonly maxIntervalSeconds?: number
129
- /**
130
- * The multiplier to apply to the interval between retries. Default is `1.5`.
131
- *
132
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#multiplier ResourceAction#multiplier}
133
- */
134
- readonly multiplier?: number
135
- /**
136
- * 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`.
137
- *
138
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#randomization_factor ResourceAction#randomization_factor}
139
- */
140
- readonly randomizationFactor?: number
141
- }
142
-
143
- export function resourceActionRetryToTerraform(struct?: ResourceActionRetry | cdktf.IResolvable): any {
144
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
145
- return struct
146
- }
147
- if (cdktf.isComplexElement(struct)) {
148
- throw new Error(
149
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
150
- )
151
- }
152
- return {
153
- error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex),
154
- interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds),
155
- max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds),
156
- multiplier: cdktf.numberToTerraform(struct!.multiplier),
157
- randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor),
158
- }
159
- }
160
-
161
- export function resourceActionRetryToHclTerraform(struct?: ResourceActionRetry | cdktf.IResolvable): any {
162
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
163
- return struct
164
- }
165
- if (cdktf.isComplexElement(struct)) {
166
- throw new Error(
167
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
168
- )
169
- }
170
- const attrs = {
171
- error_message_regex: {
172
- value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex),
173
- isBlock: false,
174
- type: 'list',
175
- storageClassType: 'stringList',
176
- },
177
- interval_seconds: {
178
- value: cdktf.numberToHclTerraform(struct!.intervalSeconds),
179
- isBlock: false,
180
- type: 'simple',
181
- storageClassType: 'number',
182
- },
183
- max_interval_seconds: {
184
- value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds),
185
- isBlock: false,
186
- type: 'simple',
187
- storageClassType: 'number',
188
- },
189
- multiplier: {
190
- value: cdktf.numberToHclTerraform(struct!.multiplier),
191
- isBlock: false,
192
- type: 'simple',
193
- storageClassType: 'number',
194
- },
195
- randomization_factor: {
196
- value: cdktf.numberToHclTerraform(struct!.randomizationFactor),
197
- isBlock: false,
198
- type: 'simple',
199
- storageClassType: 'number',
200
- },
201
- }
202
-
203
- // remove undefined attributes
204
- return Object.fromEntries(
205
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
206
- )
207
- }
208
-
209
- export class ResourceActionRetryOutputReference extends cdktf.ComplexObject {
210
- private isEmptyObject = false
211
- private resolvableValue?: cdktf.IResolvable
212
-
213
- /**
214
- * @param terraformResource The parent resource
215
- * @param terraformAttribute The attribute on the parent resource this class is referencing
216
- */
217
- public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) {
218
- super(terraformResource, terraformAttribute, false)
219
- }
220
-
221
- public get internalValue(): ResourceActionRetry | cdktf.IResolvable | undefined {
222
- if (this.resolvableValue) {
223
- return this.resolvableValue
224
- }
225
- let hasAnyValues = this.isEmptyObject
226
- const internalValueResult: any = {}
227
- if (this._errorMessageRegex !== undefined) {
228
- hasAnyValues = true
229
- internalValueResult.errorMessageRegex = this._errorMessageRegex
230
- }
231
- if (this._intervalSeconds !== undefined) {
232
- hasAnyValues = true
233
- internalValueResult.intervalSeconds = this._intervalSeconds
234
- }
235
- if (this._maxIntervalSeconds !== undefined) {
236
- hasAnyValues = true
237
- internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds
238
- }
239
- if (this._multiplier !== undefined) {
240
- hasAnyValues = true
241
- internalValueResult.multiplier = this._multiplier
242
- }
243
- if (this._randomizationFactor !== undefined) {
244
- hasAnyValues = true
245
- internalValueResult.randomizationFactor = this._randomizationFactor
246
- }
247
- return hasAnyValues ? internalValueResult : undefined
248
- }
249
-
250
- public set internalValue(value: ResourceActionRetry | cdktf.IResolvable | undefined) {
251
- if (value === undefined) {
252
- this.isEmptyObject = false
253
- this.resolvableValue = undefined
254
- this._errorMessageRegex = undefined
255
- this._intervalSeconds = undefined
256
- this._maxIntervalSeconds = undefined
257
- this._multiplier = undefined
258
- this._randomizationFactor = undefined
259
- } else if (cdktf.Tokenization.isResolvable(value)) {
260
- this.isEmptyObject = false
261
- this.resolvableValue = value
262
- } else {
263
- this.isEmptyObject = Object.keys(value).length === 0
264
- this.resolvableValue = undefined
265
- this._errorMessageRegex = value.errorMessageRegex
266
- this._intervalSeconds = value.intervalSeconds
267
- this._maxIntervalSeconds = value.maxIntervalSeconds
268
- this._multiplier = value.multiplier
269
- this._randomizationFactor = value.randomizationFactor
270
- }
271
- }
272
-
273
- // error_message_regex - computed: false, optional: false, required: true
274
- private _errorMessageRegex?: string[]
275
- public get errorMessageRegex() {
276
- return this.getListAttribute('error_message_regex')
277
- }
278
- public set errorMessageRegex(value: string[]) {
279
- this._errorMessageRegex = value
280
- }
281
- // Temporarily expose input value. Use with caution.
282
- public get errorMessageRegexInput() {
283
- return this._errorMessageRegex
284
- }
285
-
286
- // interval_seconds - computed: true, optional: true, required: false
287
- private _intervalSeconds?: number
288
- public get intervalSeconds() {
289
- return this.getNumberAttribute('interval_seconds')
290
- }
291
- public set intervalSeconds(value: number) {
292
- this._intervalSeconds = value
293
- }
294
- public resetIntervalSeconds() {
295
- this._intervalSeconds = undefined
296
- }
297
- // Temporarily expose input value. Use with caution.
298
- public get intervalSecondsInput() {
299
- return this._intervalSeconds
300
- }
301
-
302
- // max_interval_seconds - computed: true, optional: true, required: false
303
- private _maxIntervalSeconds?: number
304
- public get maxIntervalSeconds() {
305
- return this.getNumberAttribute('max_interval_seconds')
306
- }
307
- public set maxIntervalSeconds(value: number) {
308
- this._maxIntervalSeconds = value
309
- }
310
- public resetMaxIntervalSeconds() {
311
- this._maxIntervalSeconds = undefined
312
- }
313
- // Temporarily expose input value. Use with caution.
314
- public get maxIntervalSecondsInput() {
315
- return this._maxIntervalSeconds
316
- }
317
-
318
- // multiplier - computed: true, optional: true, required: false
319
- private _multiplier?: number
320
- public get multiplier() {
321
- return this.getNumberAttribute('multiplier')
322
- }
323
- public set multiplier(value: number) {
324
- this._multiplier = value
325
- }
326
- public resetMultiplier() {
327
- this._multiplier = undefined
328
- }
329
- // Temporarily expose input value. Use with caution.
330
- public get multiplierInput() {
331
- return this._multiplier
332
- }
333
-
334
- // randomization_factor - computed: true, optional: true, required: false
335
- private _randomizationFactor?: number
336
- public get randomizationFactor() {
337
- return this.getNumberAttribute('randomization_factor')
338
- }
339
- public set randomizationFactor(value: number) {
340
- this._randomizationFactor = value
341
- }
342
- public resetRandomizationFactor() {
343
- this._randomizationFactor = undefined
344
- }
345
- // Temporarily expose input value. Use with caution.
346
- public get randomizationFactorInput() {
347
- return this._randomizationFactor
348
- }
349
- }
350
- export interface ResourceActionTimeouts {
351
- /**
352
- * 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).
353
- *
354
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#create ResourceAction#create}
355
- */
356
- readonly create?: string
357
- /**
358
- * 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
359
- *
360
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#delete ResourceAction#delete}
361
- */
362
- readonly delete?: string
363
- /**
364
- * 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.
365
- *
366
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#read ResourceAction#read}
367
- */
368
- readonly read?: string
369
- /**
370
- * 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).
371
- *
372
- * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#update ResourceAction#update}
373
- */
374
- readonly update?: string
375
- }
376
-
377
- export function resourceActionTimeoutsToTerraform(struct?: ResourceActionTimeouts | cdktf.IResolvable): any {
378
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
379
- return struct
380
- }
381
- if (cdktf.isComplexElement(struct)) {
382
- throw new Error(
383
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
384
- )
385
- }
386
- return {
387
- create: cdktf.stringToTerraform(struct!.create),
388
- delete: cdktf.stringToTerraform(struct!.delete),
389
- read: cdktf.stringToTerraform(struct!.read),
390
- update: cdktf.stringToTerraform(struct!.update),
391
- }
392
- }
393
-
394
- export function resourceActionTimeoutsToHclTerraform(struct?: ResourceActionTimeouts | cdktf.IResolvable): any {
395
- if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
396
- return struct
397
- }
398
- if (cdktf.isComplexElement(struct)) {
399
- throw new Error(
400
- 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration'
401
- )
402
- }
403
- const attrs = {
404
- create: {
405
- value: cdktf.stringToHclTerraform(struct!.create),
406
- isBlock: false,
407
- type: 'simple',
408
- storageClassType: 'string',
409
- },
410
- delete: {
411
- value: cdktf.stringToHclTerraform(struct!.delete),
412
- isBlock: false,
413
- type: 'simple',
414
- storageClassType: 'string',
415
- },
416
- read: {
417
- value: cdktf.stringToHclTerraform(struct!.read),
418
- isBlock: false,
419
- type: 'simple',
420
- storageClassType: 'string',
421
- },
422
- update: {
423
- value: cdktf.stringToHclTerraform(struct!.update),
424
- isBlock: false,
425
- type: 'simple',
426
- storageClassType: 'string',
427
- },
428
- }
429
-
430
- // remove undefined attributes
431
- return Object.fromEntries(
432
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
433
- )
434
- }
435
-
436
- export class ResourceActionTimeoutsOutputReference extends cdktf.ComplexObject {
437
- private isEmptyObject = false
438
- private resolvableValue?: cdktf.IResolvable
439
-
440
- /**
441
- * @param terraformResource The parent resource
442
- * @param terraformAttribute The attribute on the parent resource this class is referencing
443
- */
444
- public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) {
445
- super(terraformResource, terraformAttribute, false)
446
- }
447
-
448
- public get internalValue(): ResourceActionTimeouts | cdktf.IResolvable | undefined {
449
- if (this.resolvableValue) {
450
- return this.resolvableValue
451
- }
452
- let hasAnyValues = this.isEmptyObject
453
- const internalValueResult: any = {}
454
- if (this._create !== undefined) {
455
- hasAnyValues = true
456
- internalValueResult.create = this._create
457
- }
458
- if (this._delete !== undefined) {
459
- hasAnyValues = true
460
- internalValueResult.delete = this._delete
461
- }
462
- if (this._read !== undefined) {
463
- hasAnyValues = true
464
- internalValueResult.read = this._read
465
- }
466
- if (this._update !== undefined) {
467
- hasAnyValues = true
468
- internalValueResult.update = this._update
469
- }
470
- return hasAnyValues ? internalValueResult : undefined
471
- }
472
-
473
- public set internalValue(value: ResourceActionTimeouts | cdktf.IResolvable | undefined) {
474
- if (value === undefined) {
475
- this.isEmptyObject = false
476
- this.resolvableValue = undefined
477
- this._create = undefined
478
- this._delete = undefined
479
- this._read = undefined
480
- this._update = undefined
481
- } else if (cdktf.Tokenization.isResolvable(value)) {
482
- this.isEmptyObject = false
483
- this.resolvableValue = value
484
- } else {
485
- this.isEmptyObject = Object.keys(value).length === 0
486
- this.resolvableValue = undefined
487
- this._create = value.create
488
- this._delete = value.delete
489
- this._read = value.read
490
- this._update = value.update
491
- }
492
- }
493
-
494
- // create - computed: false, optional: true, required: false
495
- private _create?: string
496
- public get create() {
497
- return this.getStringAttribute('create')
498
- }
499
- public set create(value: string) {
500
- this._create = value
501
- }
502
- public resetCreate() {
503
- this._create = undefined
504
- }
505
- // Temporarily expose input value. Use with caution.
506
- public get createInput() {
507
- return this._create
508
- }
509
-
510
- // delete - computed: false, optional: true, required: false
511
- private _delete?: string
512
- public get delete() {
513
- return this.getStringAttribute('delete')
514
- }
515
- public set delete(value: string) {
516
- this._delete = value
517
- }
518
- public resetDelete() {
519
- this._delete = undefined
520
- }
521
- // Temporarily expose input value. Use with caution.
522
- public get deleteInput() {
523
- return this._delete
524
- }
525
-
526
- // read - computed: false, optional: true, required: false
527
- private _read?: string
528
- public get read() {
529
- return this.getStringAttribute('read')
530
- }
531
- public set read(value: string) {
532
- this._read = value
533
- }
534
- public resetRead() {
535
- this._read = undefined
536
- }
537
- // Temporarily expose input value. Use with caution.
538
- public get readInput() {
539
- return this._read
540
- }
541
-
542
- // update - computed: false, optional: true, required: false
543
- private _update?: string
544
- public get update() {
545
- return this.getStringAttribute('update')
546
- }
547
- public set update(value: string) {
548
- this._update = value
549
- }
550
- public resetUpdate() {
551
- this._update = undefined
552
- }
553
- // Temporarily expose input value. Use with caution.
554
- public get updateInput() {
555
- return this._update
556
- }
557
- }
558
-
559
- /**
560
- * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action azapi_resource_action}
561
- */
562
- export class ResourceAction extends cdktf.TerraformResource {
563
- // =================
564
- // STATIC PROPERTIES
565
- // =================
566
- public static readonly tfResourceType = 'azapi_resource_action'
567
-
568
- // ==============
569
- // STATIC Methods
570
- // ==============
571
- /**
572
- * Generates CDKTF code for importing a ResourceAction resource upon running "cdktf plan <stack-name>"
573
- * @param scope The scope in which to define this construct
574
- * @param importToId The construct id used in the generated config for the ResourceAction to import
575
- * @param importFromId The id of the existing ResourceAction that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#import import section} in the documentation of this resource for the id to use
576
- * @param provider? Optional instance of the provider where the ResourceAction to import is found
577
- */
578
- public static generateConfigForImport(
579
- scope: Construct,
580
- importToId: string,
581
- importFromId: string,
582
- provider?: cdktf.TerraformProvider
583
- ) {
584
- return new cdktf.ImportableResource(scope, importToId, {
585
- terraformResourceType: 'azapi_resource_action',
586
- importId: importFromId,
587
- provider,
588
- })
589
- }
590
-
591
- // ===========
592
- // INITIALIZER
593
- // ===========
594
-
595
- /**
596
- * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action azapi_resource_action} Resource
597
- *
598
- * @param scope The scope in which to define this construct
599
- * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
600
- * @param options ResourceActionConfig
601
- */
602
- public constructor(scope: Construct, id: string, config: ResourceActionConfig) {
603
- super(scope, id, {
604
- terraformResourceType: 'azapi_resource_action',
605
- terraformGeneratorMetadata: {
606
- providerName: 'azapi',
607
- providerVersion: '2.2.0',
608
- providerVersionConstraint: '~> 2.2',
609
- },
610
- provider: config.provider,
611
- dependsOn: config.dependsOn,
612
- count: config.count,
613
- lifecycle: config.lifecycle,
614
- provisioners: config.provisioners,
615
- connection: config.connection,
616
- forEach: config.forEach,
617
- })
618
- this._action = config.action
619
- this._body = config.body
620
- this._headers = config.headers
621
- this._locks = config.locks
622
- this._method = config.method
623
- this._queryParameters = config.queryParameters
624
- this._resourceId = config.resourceId
625
- this._responseExportValues = config.responseExportValues
626
- this._retry.internalValue = config.retry
627
- this._type = config.type
628
- this._when = config.when
629
- this._timeouts.internalValue = config.timeouts
630
- }
631
-
632
- // ==========
633
- // ATTRIBUTES
634
- // ==========
635
-
636
- // action - computed: false, optional: true, required: false
637
- private _action?: string
638
- public get action() {
639
- return this.getStringAttribute('action')
640
- }
641
- public set action(value: string) {
642
- this._action = value
643
- }
644
- public resetAction() {
645
- this._action = undefined
646
- }
647
- // Temporarily expose input value. Use with caution.
648
- public get actionInput() {
649
- return this._action
650
- }
651
-
652
- // body - computed: false, optional: true, required: false
653
- private _body?: { [key: string]: any }
654
- public get body() {
655
- return this.getAnyMapAttribute('body')
656
- }
657
- public set body(value: { [key: string]: any }) {
658
- this._body = value
659
- }
660
- public resetBody() {
661
- this._body = undefined
662
- }
663
- // Temporarily expose input value. Use with caution.
664
- public get bodyInput() {
665
- return this._body
666
- }
667
-
668
- // headers - computed: false, optional: true, required: false
669
- private _headers?: { [key: string]: string }
670
- public get headers() {
671
- return this.getStringMapAttribute('headers')
672
- }
673
- public set headers(value: { [key: string]: string }) {
674
- this._headers = value
675
- }
676
- public resetHeaders() {
677
- this._headers = undefined
678
- }
679
- // Temporarily expose input value. Use with caution.
680
- public get headersInput() {
681
- return this._headers
682
- }
683
-
684
- // id - computed: true, optional: false, required: false
685
- public get id() {
686
- return this.getStringAttribute('id')
687
- }
688
-
689
- // locks - computed: false, optional: true, required: false
690
- private _locks?: string[]
691
- public get locks() {
692
- return this.getListAttribute('locks')
693
- }
694
- public set locks(value: string[]) {
695
- this._locks = value
696
- }
697
- public resetLocks() {
698
- this._locks = undefined
699
- }
700
- // Temporarily expose input value. Use with caution.
701
- public get locksInput() {
702
- return this._locks
703
- }
704
-
705
- // method - computed: true, optional: true, required: false
706
- private _method?: string
707
- public get method() {
708
- return this.getStringAttribute('method')
709
- }
710
- public set method(value: string) {
711
- this._method = value
712
- }
713
- public resetMethod() {
714
- this._method = undefined
715
- }
716
- // Temporarily expose input value. Use with caution.
717
- public get methodInput() {
718
- return this._method
719
- }
720
-
721
- // output - computed: true, optional: false, required: false
722
- private _output = new cdktf.AnyMap(this, 'output')
723
- public get output() {
724
- return this._output
725
- }
726
-
727
- // query_parameters - computed: false, optional: true, required: false
728
- private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable
729
- public get queryParameters() {
730
- return this.interpolationForAttribute('query_parameters')
731
- }
732
- public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) {
733
- this._queryParameters = value
734
- }
735
- public resetQueryParameters() {
736
- this._queryParameters = undefined
737
- }
738
- // Temporarily expose input value. Use with caution.
739
- public get queryParametersInput() {
740
- return this._queryParameters
741
- }
742
-
743
- // resource_id - computed: false, optional: false, required: true
744
- private _resourceId?: string
745
- public get resourceId() {
746
- return this.getStringAttribute('resource_id')
747
- }
748
- public set resourceId(value: string) {
749
- this._resourceId = value
750
- }
751
- // Temporarily expose input value. Use with caution.
752
- public get resourceIdInput() {
753
- return this._resourceId
754
- }
755
-
756
- // response_export_values - computed: false, optional: true, required: false
757
- private _responseExportValues?: { [key: string]: any }
758
- public get responseExportValues() {
759
- return this.getAnyMapAttribute('response_export_values')
760
- }
761
- public set responseExportValues(value: { [key: string]: any }) {
762
- this._responseExportValues = value
763
- }
764
- public resetResponseExportValues() {
765
- this._responseExportValues = undefined
766
- }
767
- // Temporarily expose input value. Use with caution.
768
- public get responseExportValuesInput() {
769
- return this._responseExportValues
770
- }
771
-
772
- // retry - computed: false, optional: true, required: false
773
- private _retry = new ResourceActionRetryOutputReference(this, 'retry')
774
- public get retry() {
775
- return this._retry
776
- }
777
- public putRetry(value: ResourceActionRetry) {
778
- this._retry.internalValue = value
779
- }
780
- public resetRetry() {
781
- this._retry.internalValue = undefined
782
- }
783
- // Temporarily expose input value. Use with caution.
784
- public get retryInput() {
785
- return this._retry.internalValue
786
- }
787
-
788
- // type - computed: false, optional: false, required: true
789
- private _type?: string
790
- public get type() {
791
- return this.getStringAttribute('type')
792
- }
793
- public set type(value: string) {
794
- this._type = value
795
- }
796
- // Temporarily expose input value. Use with caution.
797
- public get typeInput() {
798
- return this._type
799
- }
800
-
801
- // when - computed: true, optional: true, required: false
802
- private _when?: string
803
- public get when() {
804
- return this.getStringAttribute('when')
805
- }
806
- public set when(value: string) {
807
- this._when = value
808
- }
809
- public resetWhen() {
810
- this._when = undefined
811
- }
812
- // Temporarily expose input value. Use with caution.
813
- public get whenInput() {
814
- return this._when
815
- }
816
-
817
- // timeouts - computed: false, optional: true, required: false
818
- private _timeouts = new ResourceActionTimeoutsOutputReference(this, 'timeouts')
819
- public get timeouts() {
820
- return this._timeouts
821
- }
822
- public putTimeouts(value: ResourceActionTimeouts) {
823
- this._timeouts.internalValue = value
824
- }
825
- public resetTimeouts() {
826
- this._timeouts.internalValue = undefined
827
- }
828
- // Temporarily expose input value. Use with caution.
829
- public get timeoutsInput() {
830
- return this._timeouts.internalValue
831
- }
832
-
833
- // =========
834
- // SYNTHESIS
835
- // =========
836
-
837
- protected synthesizeAttributes(): { [name: string]: any } {
838
- return {
839
- action: cdktf.stringToTerraform(this._action),
840
- body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body),
841
- headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers),
842
- locks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._locks),
843
- method: cdktf.stringToTerraform(this._method),
844
- query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters),
845
- resource_id: cdktf.stringToTerraform(this._resourceId),
846
- response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues),
847
- retry: resourceActionRetryToTerraform(this._retry.internalValue),
848
- type: cdktf.stringToTerraform(this._type),
849
- when: cdktf.stringToTerraform(this._when),
850
- timeouts: resourceActionTimeoutsToTerraform(this._timeouts.internalValue),
851
- }
852
- }
853
-
854
- protected synthesizeHclAttributes(): { [name: string]: any } {
855
- const attrs = {
856
- action: {
857
- value: cdktf.stringToHclTerraform(this._action),
858
- isBlock: false,
859
- type: 'simple',
860
- storageClassType: 'string',
861
- },
862
- body: {
863
- value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body),
864
- isBlock: false,
865
- type: 'map',
866
- storageClassType: 'anyMap',
867
- },
868
- headers: {
869
- value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers),
870
- isBlock: false,
871
- type: 'map',
872
- storageClassType: 'stringMap',
873
- },
874
- locks: {
875
- value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._locks),
876
- isBlock: false,
877
- type: 'list',
878
- storageClassType: 'stringList',
879
- },
880
- method: {
881
- value: cdktf.stringToHclTerraform(this._method),
882
- isBlock: false,
883
- type: 'simple',
884
- storageClassType: 'string',
885
- },
886
- query_parameters: {
887
- value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters),
888
- isBlock: false,
889
- type: 'map',
890
- storageClassType: 'stringListMap',
891
- },
892
- resource_id: {
893
- value: cdktf.stringToHclTerraform(this._resourceId),
894
- isBlock: false,
895
- type: 'simple',
896
- storageClassType: 'string',
897
- },
898
- response_export_values: {
899
- value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues),
900
- isBlock: false,
901
- type: 'map',
902
- storageClassType: 'anyMap',
903
- },
904
- retry: {
905
- value: resourceActionRetryToHclTerraform(this._retry.internalValue),
906
- isBlock: true,
907
- type: 'struct',
908
- storageClassType: 'ResourceActionRetry',
909
- },
910
- type: {
911
- value: cdktf.stringToHclTerraform(this._type),
912
- isBlock: false,
913
- type: 'simple',
914
- storageClassType: 'string',
915
- },
916
- when: {
917
- value: cdktf.stringToHclTerraform(this._when),
918
- isBlock: false,
919
- type: 'simple',
920
- storageClassType: 'string',
921
- },
922
- timeouts: {
923
- value: resourceActionTimeoutsToHclTerraform(this._timeouts.internalValue),
924
- isBlock: true,
925
- type: 'struct',
926
- storageClassType: 'ResourceActionTimeouts',
927
- },
928
- }
929
-
930
- // remove undefined attributes
931
- return Object.fromEntries(
932
- Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)
933
- )
934
- }
935
- }