@cdklabs/cdk-ssm-documents 0.0.21 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +624 -168
- package/API.md +582 -94
- package/README.md +4 -5
- package/changelog.md +3 -3
- package/lib/construct/synth-utils.js +1 -1
- package/lib/document/automation-document.js +1 -1
- package/lib/document/command-document.js +1 -1
- package/lib/document/document-builder.js +2 -2
- package/lib/document/ssm-document.d.ts +1 -0
- package/lib/document/ssm-document.js +3 -3
- package/lib/domain/choice.js +1 -1
- package/lib/domain/data-type.js +1 -1
- package/lib/domain/enum/install-action.js +2 -2
- package/lib/domain/enum/install-uninstall-repair.js +2 -2
- package/lib/domain/enum/installation-type.js +2 -2
- package/lib/domain/enum/package-name.js +2 -2
- package/lib/domain/input.js +1 -1
- package/lib/domain/operation.js +1 -1
- package/lib/domain/platform.js +1 -1
- package/lib/domain/precondition.js +1 -1
- package/lib/interface/approve-hook.js +2 -2
- package/lib/interface/auth-method.js +3 -3
- package/lib/interface/aws-invoker.js +2 -2
- package/lib/interface/downloadable-content.js +8 -8
- package/lib/interface/environment.js +3 -3
- package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
- package/lib/interface/observer.js +1 -1
- package/lib/interface/on-failure.js +6 -6
- package/lib/interface/pause-hook.js +2 -2
- package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
- package/lib/interface/run-document-location.js +2 -2
- package/lib/interface/sleep-hook.js +2 -2
- package/lib/interface/step-ref.js +1 -1
- package/lib/interface/variables/boolean-variable.js +2 -2
- package/lib/interface/variables/map-list-variable.js +2 -2
- package/lib/interface/variables/number-variable.js +2 -2
- package/lib/interface/variables/secure-string-variable.js +4 -4
- package/lib/interface/variables/string-list-variable.js +2 -2
- package/lib/interface/variables/string-map-variable.js +2 -2
- package/lib/interface/variables/string-variable.js +4 -4
- package/lib/interface/variables/variable.js +2 -2
- package/lib/interface/webhook.js +1 -1
- package/lib/parent-steps/automation/approve-step.js +5 -3
- package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
- package/lib/parent-steps/automation/aws-api-step.js +1 -1
- package/lib/parent-steps/automation/branch-step.js +1 -1
- package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
- package/lib/parent-steps/automation/copy-image-step.js +1 -1
- package/lib/parent-steps/automation/create-image-step.js +1 -1
- package/lib/parent-steps/automation/create-stack-step.js +3 -3
- package/lib/parent-steps/automation/create-tags-step.js +3 -3
- package/lib/parent-steps/automation/delete-image-step.js +1 -1
- package/lib/parent-steps/automation/delete-stack-step.js +1 -1
- package/lib/parent-steps/automation/execute-automation-step.js +1 -1
- package/lib/parent-steps/automation/execute-script-step.d.ts +116 -39
- package/lib/parent-steps/automation/execute-script-step.js +157 -62
- package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
- package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
- package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
- package/lib/parent-steps/automation/pause-step.js +1 -1
- package/lib/parent-steps/automation/run-command-step.js +3 -3
- package/lib/parent-steps/automation/run-instance-step.js +1 -1
- package/lib/parent-steps/automation/sleep-step.js +1 -1
- package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
- package/lib/parent-steps/automation-step.js +1 -1
- package/lib/parent-steps/command/applications-step.js +1 -1
- package/lib/parent-steps/command/configure-docker-step.js +1 -1
- package/lib/parent-steps/command/configure-package-step.js +1 -1
- package/lib/parent-steps/command/domain-join-step.js +1 -1
- package/lib/parent-steps/command/download-content-step.js +1 -1
- package/lib/parent-steps/command/ps-module-step.js +1 -1
- package/lib/parent-steps/command/run-docker-action-step.js +1 -1
- package/lib/parent-steps/command/run-document-step.js +1 -1
- package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
- package/lib/parent-steps/command/run-shell-script-step.js +1 -1
- package/lib/parent-steps/command/software-inventory-step.js +1 -1
- package/lib/parent-steps/command/update-agent-step.js +1 -1
- package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
- package/lib/parent-steps/command-step.js +1 -1
- package/lib/parent-steps/step.js +1 -1
- package/lib/patterns/automation/composite-step.js +2 -2
- package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
- package/lib/patterns/automation/string-step.js +9 -7
- package/lib/patterns/document/string-document.js +1 -1
- package/lib/patterns/document/timed-document.js +10 -10
- package/lib/samples/hello-world.js +7 -8
- package/lib/simulation/automation/approve-simulation.js +1 -1
- package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
- package/lib/simulation/automation/automation-simulation-base.js +1 -1
- package/lib/simulation/automation/aws-api-simulation.js +1 -1
- package/lib/simulation/automation/branch-simulation.js +1 -1
- package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
- package/lib/simulation/automation/copy-image-simulation.js +1 -1
- package/lib/simulation/automation/create-image-simulation.js +1 -1
- package/lib/simulation/automation/create-stack-simulation.js +1 -1
- package/lib/simulation/automation/create-tags-simulation.js +1 -1
- package/lib/simulation/automation/delete-image-simulation.js +1 -1
- package/lib/simulation/automation/delete-stack-simulation.js +1 -1
- package/lib/simulation/automation/execute-script-simulation.js +5 -11
- package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
- package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
- package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
- package/lib/simulation/automation/pause-simulation.js +1 -1
- package/lib/simulation/automation/run-command-simulation.js +1 -1
- package/lib/simulation/automation/run-instance-simulation.js +1 -1
- package/lib/simulation/automation/sleep-simulation.js +1 -1
- package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
- package/lib/simulation/automation-step-simulation.js +3 -3
- package/lib/simulation/command/command-simulation-base.js +1 -1
- package/lib/simulation/command/ps-module-simulation.js +1 -1
- package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
- package/lib/simulation/command/run-shell-script-simulation.js +1 -1
- package/lib/simulation/command-step-simulation.js +1 -1
- package/lib/simulation/document/automation-simulation.js +1 -1
- package/lib/simulation/document/command-simulation.js +1 -1
- package/lib/simulation/simulation.js +1 -1
- package/package.json +1 -1
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
package/API.md
CHANGED
|
@@ -1226,6 +1226,7 @@ Any object.
|
|
|
1226
1226
|
| **Name** | **Type** | **Description** |
|
|
1227
1227
|
| --- | --- | --- |
|
|
1228
1228
|
| <code><a href="#@cdklabs/cdk-ssm-documents.AutomationDocument.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1229
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.AutomationDocument.property.cfnDocument">cfnDocument</a></code> | <code>aws-cdk-lib.aws_ssm.CfnDocument</code> | *No description.* |
|
|
1229
1230
|
| <code><a href="#@cdklabs/cdk-ssm-documents.AutomationDocument.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
1230
1231
|
| <code><a href="#@cdklabs/cdk-ssm-documents.AutomationDocument.property.docInputs">docInputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Input">Input</a>[]</code> | *No description.* |
|
|
1231
1232
|
| <code><a href="#@cdklabs/cdk-ssm-documents.AutomationDocument.property.docOutputs">docOutputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.DocumentOutput">DocumentOutput</a>[]</code> | *No description.* |
|
|
@@ -1249,6 +1250,16 @@ The tree node.
|
|
|
1249
1250
|
|
|
1250
1251
|
---
|
|
1251
1252
|
|
|
1253
|
+
##### `cfnDocument`<sup>Required</sup> <a name="cfnDocument" id="@cdklabs/cdk-ssm-documents.AutomationDocument.property.cfnDocument"></a>
|
|
1254
|
+
|
|
1255
|
+
```typescript
|
|
1256
|
+
public readonly cfnDocument: CfnDocument;
|
|
1257
|
+
```
|
|
1258
|
+
|
|
1259
|
+
- *Type:* aws-cdk-lib.aws_ssm.CfnDocument
|
|
1260
|
+
|
|
1261
|
+
---
|
|
1262
|
+
|
|
1252
1263
|
##### `description`<sup>Required</sup> <a name="description" id="@cdklabs/cdk-ssm-documents.AutomationDocument.property.description"></a>
|
|
1253
1264
|
|
|
1254
1265
|
```typescript
|
|
@@ -2872,6 +2883,7 @@ Any object.
|
|
|
2872
2883
|
| **Name** | **Type** | **Description** |
|
|
2873
2884
|
| --- | --- | --- |
|
|
2874
2885
|
| <code><a href="#@cdklabs/cdk-ssm-documents.CommandDocument.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
2886
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.CommandDocument.property.cfnDocument">cfnDocument</a></code> | <code>aws-cdk-lib.aws_ssm.CfnDocument</code> | *No description.* |
|
|
2875
2887
|
| <code><a href="#@cdklabs/cdk-ssm-documents.CommandDocument.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
2876
2888
|
| <code><a href="#@cdklabs/cdk-ssm-documents.CommandDocument.property.docInputs">docInputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Input">Input</a>[]</code> | *No description.* |
|
|
2877
2889
|
| <code><a href="#@cdklabs/cdk-ssm-documents.CommandDocument.property.docOutputs">docOutputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.DocumentOutput">DocumentOutput</a>[]</code> | *No description.* |
|
|
@@ -2895,6 +2907,16 @@ The tree node.
|
|
|
2895
2907
|
|
|
2896
2908
|
---
|
|
2897
2909
|
|
|
2910
|
+
##### `cfnDocument`<sup>Required</sup> <a name="cfnDocument" id="@cdklabs/cdk-ssm-documents.CommandDocument.property.cfnDocument"></a>
|
|
2911
|
+
|
|
2912
|
+
```typescript
|
|
2913
|
+
public readonly cfnDocument: CfnDocument;
|
|
2914
|
+
```
|
|
2915
|
+
|
|
2916
|
+
- *Type:* aws-cdk-lib.aws_ssm.CfnDocument
|
|
2917
|
+
|
|
2918
|
+
---
|
|
2919
|
+
|
|
2898
2920
|
##### `description`<sup>Required</sup> <a name="description" id="@cdklabs/cdk-ssm-documents.CommandDocument.property.description"></a>
|
|
2899
2921
|
|
|
2900
2922
|
```typescript
|
|
@@ -7578,7 +7600,6 @@ public variables(): {[ key: string ]: any}
|
|
|
7578
7600
|
| **Name** | **Description** |
|
|
7579
7601
|
| --- | --- |
|
|
7580
7602
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
7581
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.getLanguage">getLanguage</a></code> | *No description.* |
|
|
7582
7603
|
|
|
7583
7604
|
---
|
|
7584
7605
|
|
|
@@ -7600,20 +7621,6 @@ Any object.
|
|
|
7600
7621
|
|
|
7601
7622
|
---
|
|
7602
7623
|
|
|
7603
|
-
##### `getLanguage` <a name="getLanguage" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStep.getLanguage"></a>
|
|
7604
|
-
|
|
7605
|
-
```typescript
|
|
7606
|
-
import { ExecuteScriptStep } from '@cdklabs/cdk-ssm-documents'
|
|
7607
|
-
|
|
7608
|
-
ExecuteScriptStep.getLanguage(runtime: string)
|
|
7609
|
-
```
|
|
7610
|
-
|
|
7611
|
-
###### `runtime`<sup>Required</sup> <a name="runtime" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStep.getLanguage.parameter.runtime"></a>
|
|
7612
|
-
|
|
7613
|
-
- *Type:* string
|
|
7614
|
-
|
|
7615
|
-
---
|
|
7616
|
-
|
|
7617
7624
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
7618
7625
|
|
|
7619
7626
|
| **Name** | **Type** | **Description** |
|
|
@@ -7632,9 +7639,8 @@ ExecuteScriptStep.getLanguage(runtime: string)
|
|
|
7632
7639
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.explicitNextStep">explicitNextStep</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.StepRef">StepRef</a></code> | *No description.* |
|
|
7633
7640
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.allStepsInExecution">allStepsInExecution</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.AutomationStep">AutomationStep</a>[]</code> | *No description.* |
|
|
7634
7641
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.nextStep">nextStep</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.AutomationStep">AutomationStep</a></code> | *No description.* |
|
|
7635
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.
|
|
7636
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.
|
|
7637
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.inputs">inputs</a></code> | <code>string[]</code> | *No description.* |
|
|
7642
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.code">code</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode">ScriptCode</a></code> | *No description.* |
|
|
7643
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.inputs">inputs</a></code> | <code>{[ key: string ]: <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>}</code> | *No description.* |
|
|
7638
7644
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.language">language</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage">ScriptLanguage</a></code> | *No description.* |
|
|
7639
7645
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.outputs">outputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Output">Output</a>[]</code> | *No description.* |
|
|
7640
7646
|
|
|
@@ -7782,33 +7788,23 @@ public readonly nextStep: AutomationStep;
|
|
|
7782
7788
|
|
|
7783
7789
|
---
|
|
7784
7790
|
|
|
7785
|
-
##### `
|
|
7791
|
+
##### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.code"></a>
|
|
7786
7792
|
|
|
7787
7793
|
```typescript
|
|
7788
|
-
public readonly
|
|
7794
|
+
public readonly code: ScriptCode;
|
|
7789
7795
|
```
|
|
7790
7796
|
|
|
7791
|
-
- *Type:*
|
|
7792
|
-
|
|
7793
|
-
---
|
|
7794
|
-
|
|
7795
|
-
##### `handlerName`<sup>Required</sup> <a name="handlerName" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.handlerName"></a>
|
|
7796
|
-
|
|
7797
|
-
```typescript
|
|
7798
|
-
public readonly handlerName: string;
|
|
7799
|
-
```
|
|
7800
|
-
|
|
7801
|
-
- *Type:* string
|
|
7797
|
+
- *Type:* <a href="#@cdklabs/cdk-ssm-documents.ScriptCode">ScriptCode</a>
|
|
7802
7798
|
|
|
7803
7799
|
---
|
|
7804
7800
|
|
|
7805
7801
|
##### `inputs`<sup>Required</sup> <a name="inputs" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStep.property.inputs"></a>
|
|
7806
7802
|
|
|
7807
7803
|
```typescript
|
|
7808
|
-
public readonly inputs: string
|
|
7804
|
+
public readonly inputs: {[ key: string ]: IGenericVariable};
|
|
7809
7805
|
```
|
|
7810
7806
|
|
|
7811
|
-
- *Type:* string
|
|
7807
|
+
- *Type:* {[ key: string ]: <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>}
|
|
7812
7808
|
|
|
7813
7809
|
---
|
|
7814
7810
|
|
|
@@ -13747,6 +13743,7 @@ Any object.
|
|
|
13747
13743
|
| **Name** | **Type** | **Description** |
|
|
13748
13744
|
| --- | --- | --- |
|
|
13749
13745
|
| <code><a href="#@cdklabs/cdk-ssm-documents.SsmDocument.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
13746
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.SsmDocument.property.cfnDocument">cfnDocument</a></code> | <code>aws-cdk-lib.aws_ssm.CfnDocument</code> | *No description.* |
|
|
13750
13747
|
| <code><a href="#@cdklabs/cdk-ssm-documents.SsmDocument.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
13751
13748
|
| <code><a href="#@cdklabs/cdk-ssm-documents.SsmDocument.property.docInputs">docInputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Input">Input</a>[]</code> | *No description.* |
|
|
13752
13749
|
| <code><a href="#@cdklabs/cdk-ssm-documents.SsmDocument.property.docOutputs">docOutputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.DocumentOutput">DocumentOutput</a>[]</code> | *No description.* |
|
|
@@ -13769,6 +13766,16 @@ The tree node.
|
|
|
13769
13766
|
|
|
13770
13767
|
---
|
|
13771
13768
|
|
|
13769
|
+
##### `cfnDocument`<sup>Required</sup> <a name="cfnDocument" id="@cdklabs/cdk-ssm-documents.SsmDocument.property.cfnDocument"></a>
|
|
13770
|
+
|
|
13771
|
+
```typescript
|
|
13772
|
+
public readonly cfnDocument: CfnDocument;
|
|
13773
|
+
```
|
|
13774
|
+
|
|
13775
|
+
- *Type:* aws-cdk-lib.aws_ssm.CfnDocument
|
|
13776
|
+
|
|
13777
|
+
---
|
|
13778
|
+
|
|
13772
13779
|
##### `description`<sup>Required</sup> <a name="description" id="@cdklabs/cdk-ssm-documents.SsmDocument.property.description"></a>
|
|
13773
13780
|
|
|
13774
13781
|
```typescript
|
|
@@ -14305,6 +14312,7 @@ Any object.
|
|
|
14305
14312
|
| **Name** | **Type** | **Description** |
|
|
14306
14313
|
| --- | --- | --- |
|
|
14307
14314
|
| <code><a href="#@cdklabs/cdk-ssm-documents.TimedDocument.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
14315
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.TimedDocument.property.cfnDocument">cfnDocument</a></code> | <code>aws-cdk-lib.aws_ssm.CfnDocument</code> | *No description.* |
|
|
14308
14316
|
| <code><a href="#@cdklabs/cdk-ssm-documents.TimedDocument.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
14309
14317
|
| <code><a href="#@cdklabs/cdk-ssm-documents.TimedDocument.property.docInputs">docInputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Input">Input</a>[]</code> | *No description.* |
|
|
14310
14318
|
| <code><a href="#@cdklabs/cdk-ssm-documents.TimedDocument.property.docOutputs">docOutputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.DocumentOutput">DocumentOutput</a>[]</code> | *No description.* |
|
|
@@ -14328,6 +14336,16 @@ The tree node.
|
|
|
14328
14336
|
|
|
14329
14337
|
---
|
|
14330
14338
|
|
|
14339
|
+
##### `cfnDocument`<sup>Required</sup> <a name="cfnDocument" id="@cdklabs/cdk-ssm-documents.TimedDocument.property.cfnDocument"></a>
|
|
14340
|
+
|
|
14341
|
+
```typescript
|
|
14342
|
+
public readonly cfnDocument: CfnDocument;
|
|
14343
|
+
```
|
|
14344
|
+
|
|
14345
|
+
- *Type:* aws-cdk-lib.aws_ssm.CfnDocument
|
|
14346
|
+
|
|
14347
|
+
---
|
|
14348
|
+
|
|
14331
14349
|
##### `description`<sup>Required</sup> <a name="description" id="@cdklabs/cdk-ssm-documents.TimedDocument.property.description"></a>
|
|
14332
14350
|
|
|
14333
14351
|
```typescript
|
|
@@ -21659,11 +21677,9 @@ const executeScriptStepProps: ExecuteScriptStepProps = { ... }
|
|
|
21659
21677
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.onCancel">onCancel</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.OnCancel">OnCancel</a></code> | (Optional) Fallback action to take in the event that this step is cancelled. |
|
|
21660
21678
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.onFailure">onFailure</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.OnFailure">OnFailure</a></code> | (Optional) Fallback action to take in the event that this step fails. |
|
|
21661
21679
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.timeoutSeconds">timeoutSeconds</a></code> | <code>number</code> | (Optional) timeout seconds to run this step. |
|
|
21662
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.
|
|
21680
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.code">code</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode">ScriptCode</a></code> | Inline code to be executed. |
|
|
21681
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.inputPayload">inputPayload</a></code> | <code>{[ key: string ]: <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>}</code> | InputPayload that will be passed to the first parameter of the handler. |
|
|
21663
21682
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.language">language</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage">ScriptLanguage</a></code> | (Required) Language used to execute the script. |
|
|
21664
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.fullPathToCode">fullPathToCode</a></code> | <code>string</code> | Full path to the code to execute. |
|
|
21665
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.handlerName">handlerName</a></code> | <code>string</code> | (Optional) Function name in fullPathToCode file to use as entry point for script handler. |
|
|
21666
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.inlineCode">inlineCode</a></code> | <code>string</code> | Inline code to be executed. |
|
|
21667
21683
|
| <code><a href="#@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.outputs">outputs</a></code> | <code><a href="#@cdklabs/cdk-ssm-documents.Output">Output</a>[]</code> | (Optional) Outputs that the function is expected to return. |
|
|
21668
21684
|
|
|
21669
21685
|
---
|
|
@@ -21805,73 +21821,46 @@ In a simulation run, this will only be encorced after-the-fact but execution wil
|
|
|
21805
21821
|
|
|
21806
21822
|
---
|
|
21807
21823
|
|
|
21808
|
-
##### `
|
|
21824
|
+
##### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.code"></a>
|
|
21809
21825
|
|
|
21810
21826
|
```typescript
|
|
21811
|
-
public readonly
|
|
21827
|
+
public readonly code: ScriptCode;
|
|
21812
21828
|
```
|
|
21813
21829
|
|
|
21814
|
-
- *Type:*
|
|
21815
|
-
- *Default:* []
|
|
21816
|
-
|
|
21817
|
-
(Optional) Inputs that the function needs in order to execute.
|
|
21818
|
-
|
|
21819
|
-
---
|
|
21820
|
-
|
|
21821
|
-
##### `language`<sup>Required</sup> <a name="language" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.language"></a>
|
|
21822
|
-
|
|
21823
|
-
```typescript
|
|
21824
|
-
public readonly language: ScriptLanguage;
|
|
21825
|
-
```
|
|
21830
|
+
- *Type:* <a href="#@cdklabs/cdk-ssm-documents.ScriptCode">ScriptCode</a>
|
|
21826
21831
|
|
|
21827
|
-
|
|
21832
|
+
Inline code to be executed.
|
|
21828
21833
|
|
|
21829
|
-
|
|
21834
|
+
String will be used to produce function in yaml/json.
|
|
21835
|
+
Simulation will execute the function in this code using the language specified.
|
|
21830
21836
|
|
|
21831
21837
|
---
|
|
21832
21838
|
|
|
21833
|
-
##### `
|
|
21839
|
+
##### `inputPayload`<sup>Required</sup> <a name="inputPayload" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.inputPayload"></a>
|
|
21834
21840
|
|
|
21835
21841
|
```typescript
|
|
21836
|
-
public readonly
|
|
21842
|
+
public readonly inputPayload: {[ key: string ]: IGenericVariable};
|
|
21837
21843
|
```
|
|
21838
21844
|
|
|
21839
|
-
- *Type:* string
|
|
21840
|
-
|
|
21841
|
-
Full path to the code to execute.
|
|
21842
|
-
|
|
21843
|
-
File is parsed to produce yaml/json.
|
|
21844
|
-
Simulation will execute this file using the language specified.
|
|
21845
|
-
Either this OR inclineCode must be provided.
|
|
21846
|
-
|
|
21847
|
-
---
|
|
21848
|
-
|
|
21849
|
-
##### `handlerName`<sup>Optional</sup> <a name="handlerName" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.handlerName"></a>
|
|
21850
|
-
|
|
21851
|
-
```typescript
|
|
21852
|
-
public readonly handlerName: string;
|
|
21853
|
-
```
|
|
21845
|
+
- *Type:* {[ key: string ]: <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>}
|
|
21854
21846
|
|
|
21855
|
-
|
|
21856
|
-
- *Default:* script_handler
|
|
21847
|
+
InputPayload that will be passed to the first parameter of the handler.
|
|
21857
21848
|
|
|
21858
|
-
|
|
21849
|
+
This can be used to pass input data to the script.
|
|
21850
|
+
The key of this dict is the variable name that will be available to the code.
|
|
21851
|
+
The value is the Variable object.
|
|
21859
21852
|
|
|
21860
21853
|
---
|
|
21861
21854
|
|
|
21862
|
-
##### `
|
|
21855
|
+
##### `language`<sup>Required</sup> <a name="language" id="@cdklabs/cdk-ssm-documents.ExecuteScriptStepProps.property.language"></a>
|
|
21863
21856
|
|
|
21864
21857
|
```typescript
|
|
21865
|
-
public readonly
|
|
21858
|
+
public readonly language: ScriptLanguage;
|
|
21866
21859
|
```
|
|
21867
21860
|
|
|
21868
|
-
- *Type:*
|
|
21869
|
-
|
|
21870
|
-
Inline code to be executed.
|
|
21861
|
+
- *Type:* <a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage">ScriptLanguage</a>
|
|
21871
21862
|
|
|
21872
|
-
|
|
21873
|
-
Simulation will execute the function in this string using the language specified.
|
|
21874
|
-
Either this OR fullPathToCode must be provided.
|
|
21863
|
+
(Required) Language used to execute the script.
|
|
21875
21864
|
|
|
21876
21865
|
---
|
|
21877
21866
|
|
|
@@ -31492,6 +31481,126 @@ public readonly props: AwsInvocationSimulationProps;
|
|
|
31492
31481
|
---
|
|
31493
31482
|
|
|
31494
31483
|
|
|
31484
|
+
### FileScriptCode <a name="FileScriptCode" id="@cdklabs/cdk-ssm-documents.FileScriptCode"></a>
|
|
31485
|
+
|
|
31486
|
+
#### Initializers <a name="Initializers" id="@cdklabs/cdk-ssm-documents.FileScriptCode.Initializer"></a>
|
|
31487
|
+
|
|
31488
|
+
```typescript
|
|
31489
|
+
import { FileScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
31490
|
+
|
|
31491
|
+
new FileScriptCode(fullPath: string)
|
|
31492
|
+
```
|
|
31493
|
+
|
|
31494
|
+
| **Name** | **Type** | **Description** |
|
|
31495
|
+
| --- | --- | --- |
|
|
31496
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.Initializer.parameter.fullPath">fullPath</a></code> | <code>string</code> | *No description.* |
|
|
31497
|
+
|
|
31498
|
+
---
|
|
31499
|
+
|
|
31500
|
+
##### `fullPath`<sup>Required</sup> <a name="fullPath" id="@cdklabs/cdk-ssm-documents.FileScriptCode.Initializer.parameter.fullPath"></a>
|
|
31501
|
+
|
|
31502
|
+
- *Type:* string
|
|
31503
|
+
|
|
31504
|
+
---
|
|
31505
|
+
|
|
31506
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
31507
|
+
|
|
31508
|
+
| **Name** | **Description** |
|
|
31509
|
+
| --- | --- |
|
|
31510
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.codeAsString">codeAsString</a></code> | *No description.* |
|
|
31511
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.createOrGetFile">createOrGetFile</a></code> | If there is a file for this code, return it. |
|
|
31512
|
+
|
|
31513
|
+
---
|
|
31514
|
+
|
|
31515
|
+
##### `codeAsString` <a name="codeAsString" id="@cdklabs/cdk-ssm-documents.FileScriptCode.codeAsString"></a>
|
|
31516
|
+
|
|
31517
|
+
```typescript
|
|
31518
|
+
public codeAsString(): string
|
|
31519
|
+
```
|
|
31520
|
+
|
|
31521
|
+
##### `createOrGetFile` <a name="createOrGetFile" id="@cdklabs/cdk-ssm-documents.FileScriptCode.createOrGetFile"></a>
|
|
31522
|
+
|
|
31523
|
+
```typescript
|
|
31524
|
+
public createOrGetFile(_suffix: string): string
|
|
31525
|
+
```
|
|
31526
|
+
|
|
31527
|
+
If there is a file for this code, return it.
|
|
31528
|
+
|
|
31529
|
+
Otherwise, create a file with the specified suffix.
|
|
31530
|
+
|
|
31531
|
+
###### `_suffix`<sup>Required</sup> <a name="_suffix" id="@cdklabs/cdk-ssm-documents.FileScriptCode.createOrGetFile.parameter._suffix"></a>
|
|
31532
|
+
|
|
31533
|
+
- *Type:* string
|
|
31534
|
+
|
|
31535
|
+
---
|
|
31536
|
+
|
|
31537
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
31538
|
+
|
|
31539
|
+
| **Name** | **Description** |
|
|
31540
|
+
| --- | --- |
|
|
31541
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.fromFile">fromFile</a></code> | Full path to the code to execute. |
|
|
31542
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.inline">inline</a></code> | Inline code to be executed. |
|
|
31543
|
+
|
|
31544
|
+
---
|
|
31545
|
+
|
|
31546
|
+
##### `fromFile` <a name="fromFile" id="@cdklabs/cdk-ssm-documents.FileScriptCode.fromFile"></a>
|
|
31547
|
+
|
|
31548
|
+
```typescript
|
|
31549
|
+
import { FileScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
31550
|
+
|
|
31551
|
+
FileScriptCode.fromFile(fullPath: string)
|
|
31552
|
+
```
|
|
31553
|
+
|
|
31554
|
+
Full path to the code to execute.
|
|
31555
|
+
|
|
31556
|
+
File is parsed to produce yaml/json.
|
|
31557
|
+
Simulation will execute this file using the language specified.
|
|
31558
|
+
(Attachments not yet supported)
|
|
31559
|
+
|
|
31560
|
+
###### `fullPath`<sup>Required</sup> <a name="fullPath" id="@cdklabs/cdk-ssm-documents.FileScriptCode.fromFile.parameter.fullPath"></a>
|
|
31561
|
+
|
|
31562
|
+
- *Type:* string
|
|
31563
|
+
|
|
31564
|
+
---
|
|
31565
|
+
|
|
31566
|
+
##### `inline` <a name="inline" id="@cdklabs/cdk-ssm-documents.FileScriptCode.inline"></a>
|
|
31567
|
+
|
|
31568
|
+
```typescript
|
|
31569
|
+
import { FileScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
31570
|
+
|
|
31571
|
+
FileScriptCode.inline(code: string)
|
|
31572
|
+
```
|
|
31573
|
+
|
|
31574
|
+
Inline code to be executed.
|
|
31575
|
+
|
|
31576
|
+
String will be used to produce function in yaml/json.
|
|
31577
|
+
Simulation will execute the function in this string using the language specified.
|
|
31578
|
+
|
|
31579
|
+
###### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.FileScriptCode.inline.parameter.code"></a>
|
|
31580
|
+
|
|
31581
|
+
- *Type:* string
|
|
31582
|
+
|
|
31583
|
+
---
|
|
31584
|
+
|
|
31585
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
31586
|
+
|
|
31587
|
+
| **Name** | **Type** | **Description** |
|
|
31588
|
+
| --- | --- | --- |
|
|
31589
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.FileScriptCode.property.fullPath">fullPath</a></code> | <code>string</code> | *No description.* |
|
|
31590
|
+
|
|
31591
|
+
---
|
|
31592
|
+
|
|
31593
|
+
##### `fullPath`<sup>Required</sup> <a name="fullPath" id="@cdklabs/cdk-ssm-documents.FileScriptCode.property.fullPath"></a>
|
|
31594
|
+
|
|
31595
|
+
```typescript
|
|
31596
|
+
public readonly fullPath: string;
|
|
31597
|
+
```
|
|
31598
|
+
|
|
31599
|
+
- *Type:* string
|
|
31600
|
+
|
|
31601
|
+
---
|
|
31602
|
+
|
|
31603
|
+
|
|
31495
31604
|
### GenericVariable <a name="GenericVariable" id="@cdklabs/cdk-ssm-documents.GenericVariable"></a>
|
|
31496
31605
|
|
|
31497
31606
|
- *Implements:* <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>
|
|
@@ -34423,6 +34532,126 @@ public readonly authMethod: AuthMethod;
|
|
|
34423
34532
|
---
|
|
34424
34533
|
|
|
34425
34534
|
|
|
34535
|
+
### InlineScriptCode <a name="InlineScriptCode" id="@cdklabs/cdk-ssm-documents.InlineScriptCode"></a>
|
|
34536
|
+
|
|
34537
|
+
#### Initializers <a name="Initializers" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.Initializer"></a>
|
|
34538
|
+
|
|
34539
|
+
```typescript
|
|
34540
|
+
import { InlineScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
34541
|
+
|
|
34542
|
+
new InlineScriptCode(inlineCode: string)
|
|
34543
|
+
```
|
|
34544
|
+
|
|
34545
|
+
| **Name** | **Type** | **Description** |
|
|
34546
|
+
| --- | --- | --- |
|
|
34547
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.Initializer.parameter.inlineCode">inlineCode</a></code> | <code>string</code> | *No description.* |
|
|
34548
|
+
|
|
34549
|
+
---
|
|
34550
|
+
|
|
34551
|
+
##### `inlineCode`<sup>Required</sup> <a name="inlineCode" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.Initializer.parameter.inlineCode"></a>
|
|
34552
|
+
|
|
34553
|
+
- *Type:* string
|
|
34554
|
+
|
|
34555
|
+
---
|
|
34556
|
+
|
|
34557
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
34558
|
+
|
|
34559
|
+
| **Name** | **Description** |
|
|
34560
|
+
| --- | --- |
|
|
34561
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.codeAsString">codeAsString</a></code> | *No description.* |
|
|
34562
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.createOrGetFile">createOrGetFile</a></code> | If there is a file for this code, return it. |
|
|
34563
|
+
|
|
34564
|
+
---
|
|
34565
|
+
|
|
34566
|
+
##### `codeAsString` <a name="codeAsString" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.codeAsString"></a>
|
|
34567
|
+
|
|
34568
|
+
```typescript
|
|
34569
|
+
public codeAsString(): string
|
|
34570
|
+
```
|
|
34571
|
+
|
|
34572
|
+
##### `createOrGetFile` <a name="createOrGetFile" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.createOrGetFile"></a>
|
|
34573
|
+
|
|
34574
|
+
```typescript
|
|
34575
|
+
public createOrGetFile(suffix: string): string
|
|
34576
|
+
```
|
|
34577
|
+
|
|
34578
|
+
If there is a file for this code, return it.
|
|
34579
|
+
|
|
34580
|
+
Otherwise, create a file with the specified suffix.
|
|
34581
|
+
|
|
34582
|
+
###### `suffix`<sup>Required</sup> <a name="suffix" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.createOrGetFile.parameter.suffix"></a>
|
|
34583
|
+
|
|
34584
|
+
- *Type:* string
|
|
34585
|
+
|
|
34586
|
+
---
|
|
34587
|
+
|
|
34588
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
34589
|
+
|
|
34590
|
+
| **Name** | **Description** |
|
|
34591
|
+
| --- | --- |
|
|
34592
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.fromFile">fromFile</a></code> | Full path to the code to execute. |
|
|
34593
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.inline">inline</a></code> | Inline code to be executed. |
|
|
34594
|
+
|
|
34595
|
+
---
|
|
34596
|
+
|
|
34597
|
+
##### `fromFile` <a name="fromFile" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.fromFile"></a>
|
|
34598
|
+
|
|
34599
|
+
```typescript
|
|
34600
|
+
import { InlineScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
34601
|
+
|
|
34602
|
+
InlineScriptCode.fromFile(fullPath: string)
|
|
34603
|
+
```
|
|
34604
|
+
|
|
34605
|
+
Full path to the code to execute.
|
|
34606
|
+
|
|
34607
|
+
File is parsed to produce yaml/json.
|
|
34608
|
+
Simulation will execute this file using the language specified.
|
|
34609
|
+
(Attachments not yet supported)
|
|
34610
|
+
|
|
34611
|
+
###### `fullPath`<sup>Required</sup> <a name="fullPath" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.fromFile.parameter.fullPath"></a>
|
|
34612
|
+
|
|
34613
|
+
- *Type:* string
|
|
34614
|
+
|
|
34615
|
+
---
|
|
34616
|
+
|
|
34617
|
+
##### `inline` <a name="inline" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.inline"></a>
|
|
34618
|
+
|
|
34619
|
+
```typescript
|
|
34620
|
+
import { InlineScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
34621
|
+
|
|
34622
|
+
InlineScriptCode.inline(code: string)
|
|
34623
|
+
```
|
|
34624
|
+
|
|
34625
|
+
Inline code to be executed.
|
|
34626
|
+
|
|
34627
|
+
String will be used to produce function in yaml/json.
|
|
34628
|
+
Simulation will execute the function in this string using the language specified.
|
|
34629
|
+
|
|
34630
|
+
###### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.inline.parameter.code"></a>
|
|
34631
|
+
|
|
34632
|
+
- *Type:* string
|
|
34633
|
+
|
|
34634
|
+
---
|
|
34635
|
+
|
|
34636
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
34637
|
+
|
|
34638
|
+
| **Name** | **Type** | **Description** |
|
|
34639
|
+
| --- | --- | --- |
|
|
34640
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.InlineScriptCode.property.inlineCode">inlineCode</a></code> | <code>string</code> | *No description.* |
|
|
34641
|
+
|
|
34642
|
+
---
|
|
34643
|
+
|
|
34644
|
+
##### `inlineCode`<sup>Required</sup> <a name="inlineCode" id="@cdklabs/cdk-ssm-documents.InlineScriptCode.property.inlineCode"></a>
|
|
34645
|
+
|
|
34646
|
+
```typescript
|
|
34647
|
+
public readonly inlineCode: string;
|
|
34648
|
+
```
|
|
34649
|
+
|
|
34650
|
+
- *Type:* string
|
|
34651
|
+
|
|
34652
|
+
---
|
|
34653
|
+
|
|
34654
|
+
|
|
34426
34655
|
### Input <a name="Input" id="@cdklabs/cdk-ssm-documents.Input"></a>
|
|
34427
34656
|
|
|
34428
34657
|
#### Initializers <a name="Initializers" id="@cdklabs/cdk-ssm-documents.Input.Initializer"></a>
|
|
@@ -37928,6 +38157,249 @@ public readonly sourceType: string;
|
|
|
37928
38157
|
---
|
|
37929
38158
|
|
|
37930
38159
|
|
|
38160
|
+
### ScriptCode <a name="ScriptCode" id="@cdklabs/cdk-ssm-documents.ScriptCode"></a>
|
|
38161
|
+
|
|
38162
|
+
The code to run for the execution.
|
|
38163
|
+
|
|
38164
|
+
See "script" parameter here:
|
|
38165
|
+
https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeScript.html
|
|
38166
|
+
Attachments are not yet supported.
|
|
38167
|
+
|
|
38168
|
+
#### Initializers <a name="Initializers" id="@cdklabs/cdk-ssm-documents.ScriptCode.Initializer"></a>
|
|
38169
|
+
|
|
38170
|
+
```typescript
|
|
38171
|
+
import { ScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
38172
|
+
|
|
38173
|
+
new ScriptCode()
|
|
38174
|
+
```
|
|
38175
|
+
|
|
38176
|
+
| **Name** | **Type** | **Description** |
|
|
38177
|
+
| --- | --- | --- |
|
|
38178
|
+
|
|
38179
|
+
---
|
|
38180
|
+
|
|
38181
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
38182
|
+
|
|
38183
|
+
| **Name** | **Description** |
|
|
38184
|
+
| --- | --- |
|
|
38185
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode.codeAsString">codeAsString</a></code> | *No description.* |
|
|
38186
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode.createOrGetFile">createOrGetFile</a></code> | If there is a file for this code, return it. |
|
|
38187
|
+
|
|
38188
|
+
---
|
|
38189
|
+
|
|
38190
|
+
##### `codeAsString` <a name="codeAsString" id="@cdklabs/cdk-ssm-documents.ScriptCode.codeAsString"></a>
|
|
38191
|
+
|
|
38192
|
+
```typescript
|
|
38193
|
+
public codeAsString(): string
|
|
38194
|
+
```
|
|
38195
|
+
|
|
38196
|
+
##### `createOrGetFile` <a name="createOrGetFile" id="@cdklabs/cdk-ssm-documents.ScriptCode.createOrGetFile"></a>
|
|
38197
|
+
|
|
38198
|
+
```typescript
|
|
38199
|
+
public createOrGetFile(suffix: string): string
|
|
38200
|
+
```
|
|
38201
|
+
|
|
38202
|
+
If there is a file for this code, return it.
|
|
38203
|
+
|
|
38204
|
+
Otherwise, create a file with the specified suffix.
|
|
38205
|
+
|
|
38206
|
+
###### `suffix`<sup>Required</sup> <a name="suffix" id="@cdklabs/cdk-ssm-documents.ScriptCode.createOrGetFile.parameter.suffix"></a>
|
|
38207
|
+
|
|
38208
|
+
- *Type:* string
|
|
38209
|
+
|
|
38210
|
+
of the file to create (such as ".py").
|
|
38211
|
+
|
|
38212
|
+
---
|
|
38213
|
+
|
|
38214
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
38215
|
+
|
|
38216
|
+
| **Name** | **Description** |
|
|
38217
|
+
| --- | --- |
|
|
38218
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode.fromFile">fromFile</a></code> | Full path to the code to execute. |
|
|
38219
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptCode.inline">inline</a></code> | Inline code to be executed. |
|
|
38220
|
+
|
|
38221
|
+
---
|
|
38222
|
+
|
|
38223
|
+
##### `fromFile` <a name="fromFile" id="@cdklabs/cdk-ssm-documents.ScriptCode.fromFile"></a>
|
|
38224
|
+
|
|
38225
|
+
```typescript
|
|
38226
|
+
import { ScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
38227
|
+
|
|
38228
|
+
ScriptCode.fromFile(fullPath: string)
|
|
38229
|
+
```
|
|
38230
|
+
|
|
38231
|
+
Full path to the code to execute.
|
|
38232
|
+
|
|
38233
|
+
File is parsed to produce yaml/json.
|
|
38234
|
+
Simulation will execute this file using the language specified.
|
|
38235
|
+
(Attachments not yet supported)
|
|
38236
|
+
|
|
38237
|
+
###### `fullPath`<sup>Required</sup> <a name="fullPath" id="@cdklabs/cdk-ssm-documents.ScriptCode.fromFile.parameter.fullPath"></a>
|
|
38238
|
+
|
|
38239
|
+
- *Type:* string
|
|
38240
|
+
|
|
38241
|
+
---
|
|
38242
|
+
|
|
38243
|
+
##### `inline` <a name="inline" id="@cdklabs/cdk-ssm-documents.ScriptCode.inline"></a>
|
|
38244
|
+
|
|
38245
|
+
```typescript
|
|
38246
|
+
import { ScriptCode } from '@cdklabs/cdk-ssm-documents'
|
|
38247
|
+
|
|
38248
|
+
ScriptCode.inline(code: string)
|
|
38249
|
+
```
|
|
38250
|
+
|
|
38251
|
+
Inline code to be executed.
|
|
38252
|
+
|
|
38253
|
+
String will be used to produce function in yaml/json.
|
|
38254
|
+
Simulation will execute the function in this string using the language specified.
|
|
38255
|
+
|
|
38256
|
+
###### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.ScriptCode.inline.parameter.code"></a>
|
|
38257
|
+
|
|
38258
|
+
- *Type:* string
|
|
38259
|
+
|
|
38260
|
+
---
|
|
38261
|
+
|
|
38262
|
+
|
|
38263
|
+
|
|
38264
|
+
### ScriptLanguage <a name="ScriptLanguage" id="@cdklabs/cdk-ssm-documents.ScriptLanguage"></a>
|
|
38265
|
+
|
|
38266
|
+
Specifies the script language as described in the "Runtime" argument here: https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-action-executeScript.html.
|
|
38267
|
+
|
|
38268
|
+
#### Initializers <a name="Initializers" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.Initializer"></a>
|
|
38269
|
+
|
|
38270
|
+
```typescript
|
|
38271
|
+
import { ScriptLanguage } from '@cdklabs/cdk-ssm-documents'
|
|
38272
|
+
|
|
38273
|
+
new ScriptLanguage()
|
|
38274
|
+
```
|
|
38275
|
+
|
|
38276
|
+
| **Name** | **Type** | **Description** |
|
|
38277
|
+
| --- | --- | --- |
|
|
38278
|
+
|
|
38279
|
+
---
|
|
38280
|
+
|
|
38281
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
38282
|
+
|
|
38283
|
+
| **Name** | **Description** |
|
|
38284
|
+
| --- | --- |
|
|
38285
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.fileSuffix">fileSuffix</a></code> | The suffix to apply to file names of this type of execution. |
|
|
38286
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.runtime">runtime</a></code> | The associated runtime of this ScriptLanguage. |
|
|
38287
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.simulate">simulate</a></code> | Simulate an execution of this ScriptLanguage. |
|
|
38288
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.ssmInputs">ssmInputs</a></code> | Builds the ssm inputs. |
|
|
38289
|
+
|
|
38290
|
+
---
|
|
38291
|
+
|
|
38292
|
+
##### `fileSuffix` <a name="fileSuffix" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.fileSuffix"></a>
|
|
38293
|
+
|
|
38294
|
+
```typescript
|
|
38295
|
+
public fileSuffix(): string
|
|
38296
|
+
```
|
|
38297
|
+
|
|
38298
|
+
The suffix to apply to file names of this type of execution.
|
|
38299
|
+
|
|
38300
|
+
##### `runtime` <a name="runtime" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.runtime"></a>
|
|
38301
|
+
|
|
38302
|
+
```typescript
|
|
38303
|
+
public runtime(): string
|
|
38304
|
+
```
|
|
38305
|
+
|
|
38306
|
+
The associated runtime of this ScriptLanguage.
|
|
38307
|
+
|
|
38308
|
+
##### `simulate` <a name="simulate" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.simulate"></a>
|
|
38309
|
+
|
|
38310
|
+
```typescript
|
|
38311
|
+
public simulate(code: ScriptCode, inputs: {[ key: string ]: string}): {[ key: string ]: string}
|
|
38312
|
+
```
|
|
38313
|
+
|
|
38314
|
+
Simulate an execution of this ScriptLanguage.
|
|
38315
|
+
|
|
38316
|
+
Provide the inputs after replaced with the actual values (not variables).
|
|
38317
|
+
|
|
38318
|
+
###### `code`<sup>Required</sup> <a name="code" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.simulate.parameter.code"></a>
|
|
38319
|
+
|
|
38320
|
+
- *Type:* <a href="#@cdklabs/cdk-ssm-documents.ScriptCode">ScriptCode</a>
|
|
38321
|
+
|
|
38322
|
+
---
|
|
38323
|
+
|
|
38324
|
+
###### `inputs`<sup>Required</sup> <a name="inputs" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.simulate.parameter.inputs"></a>
|
|
38325
|
+
|
|
38326
|
+
- *Type:* {[ key: string ]: string}
|
|
38327
|
+
|
|
38328
|
+
---
|
|
38329
|
+
|
|
38330
|
+
##### `ssmInputs` <a name="ssmInputs" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.ssmInputs"></a>
|
|
38331
|
+
|
|
38332
|
+
```typescript
|
|
38333
|
+
public ssmInputs(): {[ key: string ]: string}
|
|
38334
|
+
```
|
|
38335
|
+
|
|
38336
|
+
Builds the ssm inputs.
|
|
38337
|
+
|
|
38338
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
38339
|
+
|
|
38340
|
+
| **Name** | **Description** |
|
|
38341
|
+
| --- | --- |
|
|
38342
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.fromRuntime">fromRuntime</a></code> | Creates a ScriptLanguage based on the provided runtime. |
|
|
38343
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ScriptLanguage.python">python</a></code> | Create a new ScriptLanguage for python execution. |
|
|
38344
|
+
|
|
38345
|
+
---
|
|
38346
|
+
|
|
38347
|
+
##### `fromRuntime` <a name="fromRuntime" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.fromRuntime"></a>
|
|
38348
|
+
|
|
38349
|
+
```typescript
|
|
38350
|
+
import { ScriptLanguage } from '@cdklabs/cdk-ssm-documents'
|
|
38351
|
+
|
|
38352
|
+
ScriptLanguage.fromRuntime(runtime: string, handlerName?: string)
|
|
38353
|
+
```
|
|
38354
|
+
|
|
38355
|
+
Creates a ScriptLanguage based on the provided runtime.
|
|
38356
|
+
|
|
38357
|
+
Prefer one of the other static constructors if possible.
|
|
38358
|
+
|
|
38359
|
+
###### `runtime`<sup>Required</sup> <a name="runtime" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.fromRuntime.parameter.runtime"></a>
|
|
38360
|
+
|
|
38361
|
+
- *Type:* string
|
|
38362
|
+
|
|
38363
|
+
is the runtime name (such as "python3.6").
|
|
38364
|
+
|
|
38365
|
+
---
|
|
38366
|
+
|
|
38367
|
+
###### `handlerName`<sup>Optional</sup> <a name="handlerName" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.fromRuntime.parameter.handlerName"></a>
|
|
38368
|
+
|
|
38369
|
+
- *Type:* string
|
|
38370
|
+
|
|
38371
|
+
to be provided for python executions.
|
|
38372
|
+
|
|
38373
|
+
---
|
|
38374
|
+
|
|
38375
|
+
##### `python` <a name="python" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.python"></a>
|
|
38376
|
+
|
|
38377
|
+
```typescript
|
|
38378
|
+
import { ScriptLanguage } from '@cdklabs/cdk-ssm-documents'
|
|
38379
|
+
|
|
38380
|
+
ScriptLanguage.python(version: PythonVersion, handlerName: string)
|
|
38381
|
+
```
|
|
38382
|
+
|
|
38383
|
+
Create a new ScriptLanguage for python execution.
|
|
38384
|
+
|
|
38385
|
+
###### `version`<sup>Required</sup> <a name="version" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.python.parameter.version"></a>
|
|
38386
|
+
|
|
38387
|
+
- *Type:* <a href="#@cdklabs/cdk-ssm-documents.PythonVersion">PythonVersion</a>
|
|
38388
|
+
|
|
38389
|
+
is the pythonVersion to use when writing the document (for simulation will not matter).
|
|
38390
|
+
|
|
38391
|
+
---
|
|
38392
|
+
|
|
38393
|
+
###### `handlerName`<sup>Required</sup> <a name="handlerName" id="@cdklabs/cdk-ssm-documents.ScriptLanguage.python.parameter.handlerName"></a>
|
|
38394
|
+
|
|
38395
|
+
- *Type:* string
|
|
38396
|
+
|
|
38397
|
+
is the function name in code as entry point for script handler.
|
|
38398
|
+
|
|
38399
|
+
---
|
|
38400
|
+
|
|
38401
|
+
|
|
38402
|
+
|
|
37931
38403
|
### SecureVariable <a name="SecureVariable" id="@cdklabs/cdk-ssm-documents.SecureVariable"></a>
|
|
37932
38404
|
|
|
37933
38405
|
- *Implements:* <a href="#@cdklabs/cdk-ssm-documents.IGenericVariable">IGenericVariable</a>
|
|
@@ -40982,49 +41454,65 @@ That allows customers to validate their CommandDocument against a given platform
|
|
|
40982
41454
|
---
|
|
40983
41455
|
|
|
40984
41456
|
|
|
40985
|
-
###
|
|
41457
|
+
### PythonVersion <a name="PythonVersion" id="@cdklabs/cdk-ssm-documents.PythonVersion"></a>
|
|
40986
41458
|
|
|
40987
|
-
|
|
41459
|
+
Python runtime to use when writing SSM Document.
|
|
40988
41460
|
|
|
40989
|
-
|
|
40990
|
-
A failed/canceled response will contain the stackTrace.
|
|
41461
|
+
Simulation will use local python version.
|
|
40991
41462
|
|
|
40992
41463
|
#### Members <a name="Members" id="Members"></a>
|
|
40993
41464
|
|
|
40994
41465
|
| **Name** | **Description** |
|
|
40995
41466
|
| --- | --- |
|
|
40996
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.
|
|
40997
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.
|
|
40998
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.
|
|
41467
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_6">VERSION_3_6</a></code> | *No description.* |
|
|
41468
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_7">VERSION_3_7</a></code> | *No description.* |
|
|
41469
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_8">VERSION_3_8</a></code> | *No description.* |
|
|
40999
41470
|
|
|
41000
41471
|
---
|
|
41001
41472
|
|
|
41002
|
-
##### `
|
|
41473
|
+
##### `VERSION_3_6` <a name="VERSION_3_6" id="@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_6"></a>
|
|
41003
41474
|
|
|
41004
41475
|
---
|
|
41005
41476
|
|
|
41006
41477
|
|
|
41007
|
-
##### `
|
|
41478
|
+
##### `VERSION_3_7` <a name="VERSION_3_7" id="@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_7"></a>
|
|
41008
41479
|
|
|
41009
41480
|
---
|
|
41010
41481
|
|
|
41011
41482
|
|
|
41012
|
-
##### `
|
|
41483
|
+
##### `VERSION_3_8` <a name="VERSION_3_8" id="@cdklabs/cdk-ssm-documents.PythonVersion.VERSION_3_8"></a>
|
|
41013
41484
|
|
|
41014
41485
|
---
|
|
41015
41486
|
|
|
41016
41487
|
|
|
41017
|
-
###
|
|
41488
|
+
### ResponseCode <a name="ResponseCode" id="@cdklabs/cdk-ssm-documents.ResponseCode"></a>
|
|
41489
|
+
|
|
41490
|
+
Steps report their ResponseCode using this enum.
|
|
41491
|
+
|
|
41492
|
+
A successful response will contain the outputs expected.
|
|
41493
|
+
A failed/canceled response will contain the stackTrace.
|
|
41018
41494
|
|
|
41019
41495
|
#### Members <a name="Members" id="Members"></a>
|
|
41020
41496
|
|
|
41021
41497
|
| **Name** | **Description** |
|
|
41022
41498
|
| --- | --- |
|
|
41023
|
-
| <code><a href="#@cdklabs/cdk-ssm-documents.
|
|
41499
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ResponseCode.SUCCESS">SUCCESS</a></code> | *No description.* |
|
|
41500
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ResponseCode.CANCELED">CANCELED</a></code> | *No description.* |
|
|
41501
|
+
| <code><a href="#@cdklabs/cdk-ssm-documents.ResponseCode.FAILED">FAILED</a></code> | *No description.* |
|
|
41502
|
+
|
|
41503
|
+
---
|
|
41504
|
+
|
|
41505
|
+
##### `SUCCESS` <a name="SUCCESS" id="@cdklabs/cdk-ssm-documents.ResponseCode.SUCCESS"></a>
|
|
41024
41506
|
|
|
41025
41507
|
---
|
|
41026
41508
|
|
|
41027
|
-
|
|
41509
|
+
|
|
41510
|
+
##### `CANCELED` <a name="CANCELED" id="@cdklabs/cdk-ssm-documents.ResponseCode.CANCELED"></a>
|
|
41511
|
+
|
|
41512
|
+
---
|
|
41513
|
+
|
|
41514
|
+
|
|
41515
|
+
##### `FAILED` <a name="FAILED" id="@cdklabs/cdk-ssm-documents.ResponseCode.FAILED"></a>
|
|
41028
41516
|
|
|
41029
41517
|
---
|
|
41030
41518
|
|